Recently Written · git

scan-subread

PDF reader that follows an audiobook with the SubRead suite

git clone https://github.com/equwal/scan-subread

Log | Files | Refs


android/app/build.gradle (2900 bytes)

1 apply plugin: 'com.android.application'
2 
3 // Release signing comes from the environment, so the key never lives in the repository.
4 def keystorePath = System.getenv("SUBREAD_KEYSTORE_FILE")
5 def keystorePassword = System.getenv("SUBREAD_KEYSTORE_PASSWORD")
6 def signingReady = keystorePath && keystorePassword && file(keystorePath).isFile()
7 
8 android {
9     namespace = "com.equwal.scansubread"
10     compileSdk = rootProject.ext.compileSdkVersion
11     defaultConfig {
12         applicationId "com.equwal.scansubread"
13         minSdkVersion rootProject.ext.minSdkVersion
14         targetSdkVersion rootProject.ext.targetSdkVersion
15         // versionCode must increase with each release.
16         versionCode 3
17         versionName "0.1.2"
18         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
19         aaptOptions {
20              // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
21              // Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61
22             ignoreAssetsPattern = '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
23         }
24     }
25     if (signingReady) {
26         signingConfigs {
27             release {
28                 storeFile file(keystorePath)
29                 storePassword keystorePassword
30                 keyAlias "subread"
31                 keyPassword keystorePassword
32             }
33         }
34     }
35     // The dependency info block is encrypted for Google only. F-Droid rejects
36     // an APK that has it.
37     dependenciesInfo {
38         includeInApk = false
39     }
40     buildTypes {
41         release {
42             // R8 removes unused code and resources. F-Droid asks for it. Capacitor
43             // brings its own keep rules for the plugin classes.
44             minifyEnabled true
45             shrinkResources true
46             proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
47             if (signingReady) signingConfig signingConfigs.release
48         }
49     }
50 }
51 
52 repositories {
53     flatDir{
54         dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
55     }
56 }
57 
58 dependencies {
59     implementation fileTree(include: ['*.jar'], dir: 'libs')
60     implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
61     implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion"
62     implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion"
63     implementation project(':capacitor-android')
64     testImplementation "junit:junit:$junitVersion"
65     androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
66     androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
67     implementation project(':capacitor-cordova-android-plugins')
68 }
69 
70 apply from: 'capacitor.build.gradle'