| 7 |
| } |
| 8 |
| 9 | configurations { |
| 10 | compile.exclude module: 'support-v4' |
| 11 | } |
| 12 |
| 13 | configurations.all { |
| 14 | exclude group: 'com.google.firebase', module: 'firebase-core' |
| 15 | } |
| 16 |
| 17 | dependencies { |
| 18 | implementation 'androidx.core:core:1.1.0-beta01' |
| 19 | implementation 'androidx.palette:palette:1.0.0' |
| 20 | implementation 'androidx.exifinterface:exifinterface:1.1.0' |
| 21 |
| 22 | compileOnly 'org.checkerframework:checker-qual:2.5.2' |
| 23 | compileOnly 'org.checkerframework:checker-compat-qual:2.5.0' |
| 24 | implementation 'com.google.firebase:firebase-messaging:20.1.0' |
| 25 | implementation 'com.google.android.gms:play-services-maps:17.0.0' |
| 26 | implementation 'com.google.android.gms:play-services-auth:17.0.0' |
| 27 | implementation 'com.google.android.gms:play-services-vision:16.2.0' |
| 28 | implementation 'com.google.android.gms:play-services-wallet:17.0.0' |
| 29 | implementation 'com.google.android.gms:play-services-wearable:17.0.0' |
| 30 | implementation 'com.google.android.gms:play-services-location:17.0.0' |
| 31 | implementation 'com.googlecode.mp4parser:isoparser:1.0.6' |
| 32 | implementation 'com.stripe:stripe-android:2.0.2' |
| 33 | implementation 'com.google.code.gson:gson:2.8.6' |
| 34 | implementation files('libs/libgsaverification-client.aar') |
| 35 | } |
| 36 |
| 37 | android { |
| 38 | compileSdkVersion 29 |
| 39 | buildToolsVersion '29.0.2' |
| 40 | ndkVersion "20.0.5594570" |
| 41 |
| 42 | defaultConfig.applicationId = "tw.nekomimi.nekogram" |
| 43 |
| 44 | sourceSets.main.jniLibs.srcDirs = ['./jni/'] |
| 45 |
| 46 | externalNativeBuild { |
| 47 | ndkBuild { |
| 48 | path "jni/Android.mk" |
| 49 | } |
| 50 | } |
| 51 |
| 52 | lintOptions { |
| 53 | disable 'MissingTranslation' |
| 54 | disable 'ExtraTranslation' |
| 55 | disable 'BlockedPrivateApi' |
| 56 | } |
| 57 |
| 58 | dexOptions { |
| 59 | jumboMode = true |
| 60 | } |
| 61 |
| 62 | compileOptions { |
| 63 | sourceCompatibility JavaVersion.VERSION_1_8 |
| 64 | targetCompatibility JavaVersion.VERSION_1_8 |
| 65 | } |
| 66 |
| 67 | signingConfigs { |
| 68 | Properties properties = new Properties() |
| 69 | properties.load(project.rootProject.file('local.properties').newDataInputStream()) |
| 70 | release { |
| 71 | storeFile file("config/release.keystore") |
| 72 | storePassword properties.getProperty("RELEASE_STORE_PASSWORD") |
| 73 | keyAlias properties.getProperty("RELEASE_KEY_ALIAS") |
| 74 | keyPassword properties.getProperty("RELEASE_KEY_PASSWORD") |
| 75 | } |
| 76 | debug { |
| 77 | storeFile file("config/release.keystore") |
| 78 | storePassword properties.getProperty("RELEASE_STORE_PASSWORD") |
| 79 | keyAlias properties.getProperty("RELEASE_KEY_ALIAS") |
| 80 | keyPassword properties.getProperty("RELEASE_KEY_PASSWORD") |
| 81 | } |
| 82 | } |
| 83 |
| 84 |
| 85 | buildTypes { |
| 86 | debug { |
| 87 | debuggable true |
| 88 | jniDebuggable true |
| 89 | signingConfig signingConfigs.debug |
| 90 | //applicationIdSuffix ".beta" |
| 91 | minifyEnabled true |
| 92 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
| 93 | } |
| 94 |
| 95 | /*debugAsan { |
| 96 | debuggable true |
| 97 | jniDebuggable true |
| 98 | signingConfig signingConfigs.debug |
| 99 | applicationIdSuffix ".beta" |
| 100 | minifyEnabled true |
| 101 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
| 102 |
| 103 | packagingOptions { |
| 104 | doNotStrip "**.so" |
| 105 | } |
| 106 |
| 107 | sourceSets { |
| 108 | main { |
| 109 | jniLibs { |
| 110 | srcDir { |
| 111 | 'jniLibs' |
| 112 | } |
| 113 | } |
| 114 | resources { |
| 115 | srcDir { |
| 116 | 'jniRes' |
| 117 | } |
| 118 | } |
| 119 | } |
| 120 | } |
| 121 | }*/ |
| 122 |
| 123 | debugMultidex { |
| 124 | initWith debug |
| 125 | minifyEnabled false |
| 126 | multiDexEnabled true |
| 127 | dependencies { |
| 128 | implementation 'com.android.support:multidex:1.0.3' |
| 129 | } |
| 130 | manifestPlaceholders = [applicationClassName: "MultiDexApplicationLoader"] |
| 131 | } |
| 132 |
| 133 | HA { |
| 134 | debuggable false |
| 135 | jniDebuggable false |
| 136 | signingConfig signingConfigs.debug |
| 137 | //applicationIdSuffix ".beta" |
| 138 | minifyEnabled true |
| 139 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
| 140 | } |
| 141 |
| 142 | release { |
| 143 | debuggable false |
| 144 | jniDebuggable false |
| 145 | signingConfig signingConfigs.release |
| 146 | minifyEnabled true |
| 147 | shrinkResources false |
| 148 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
| 149 | multiDexEnabled true |
| 150 | dependencies { |
| 151 | implementation 'com.android.support:multidex:1.0.3' |
| 152 | } |
| 153 | manifestPlaceholders = [applicationClassName: "MultiDexApplicationLoader"] |
| 154 | } |
| 155 | } |
| 156 |
| 157 | sourceSets.debug { |
| 158 | manifest.srcFile 'config/debug/AndroidManifest.xml' |
| 159 | } |
| 160 |
| 161 | /*sourceSets.debugAsan { |
| 162 | manifest.srcFile 'config/debug/AndroidManifest.xml' |
| 163 | }*/ |
| 164 |
| 165 | sourceSets.debugMultidex { |
| 166 | manifest.srcFile 'config/debug/AndroidManifest.xml' |
| 167 | java.srcDirs = ['src/multidex/java'] |
| 168 | } |
| 169 |
| 170 | sourceSets.HA { |
| 171 | manifest.srcFile 'config/debug/AndroidManifest.xml' |
| 172 | } |
| 173 |
| 174 | sourceSets.release { |
| 175 | manifest.srcFile 'config/release/AndroidManifest.xml' |
| 176 | java.srcDirs = ['src/multidex/java'] |
| 177 | } |
| 178 |
| 179 | flavorDimensions "minApi" |
| 180 |
| 181 | productFlavors { |
| 182 | armv7 { |
| 183 | ndk { |
| 184 | abiFilters "armeabi-v7a" |
| 185 | } |
| 186 | ext { |
| 187 | abiVersionCode = 1 |
| 188 | } |
| 189 | } |
| 190 | x86 { |
| 191 | ndk { |
| 192 | abiFilters "x86" |
| 193 | } |
| 194 | ext { |
| 195 | abiVersionCode = 2 |
| 196 | } |
| 197 | } |
| 198 | armv7_SDK23 { |
| 199 | ndk { |
| 200 | abiFilters "armeabi-v7a" |
| 201 | } |
| 202 | sourceSets.debug { |
| 203 | manifest.srcFile 'config/debug/AndroidManifest_SDK23.xml' |
| 204 | } |
| 205 | sourceSets.release { |
| 206 | manifest.srcFile 'config/release/AndroidManifest_SDK23.xml' |
| 207 | } |
| 208 | minSdkVersion 23 |
| 209 | ext { |
| 210 | abiVersionCode = 3 |
| 211 | } |
| 212 | } |
| 213 | x86_SDK23 { |
| 214 | ndk { |
| 215 | abiFilters "x86" |
| 216 | } |
| 217 | sourceSets.debug { |
| 218 | manifest.srcFile 'config/debug/AndroidManifest_SDK23.xml' |
| 219 | } |
| 220 | sourceSets.release { |
| 221 | manifest.srcFile 'config/release/AndroidManifest_SDK23.xml' |
| 222 | } |
| 223 | minSdkVersion 23 |
| 224 | ext { |
| 225 | abiVersionCode = 4 |
| 226 | } |
| 227 | } |
| 228 | arm64 { |
| 229 | ndk { |
| 230 | abiFilters "arm64-v8a" |
| 231 | } |
| 232 | ext { |
| 233 | abiVersionCode = 5 |
| 234 | } |
| 235 | } |
| 236 | x64 { |
| 237 | ndk { |
| 238 | abiFilters "x86_64" |
| 239 | } |
| 240 | ext { |
| 241 | abiVersionCode = 6 |
| 242 | } |
| 243 | } |
| 244 | arm64_SDK23 { |
| 245 | ndk { |
| 246 | abiFilters "arm64-v8a" |
| 247 | } |
| 248 | sourceSets.debug { |
| 249 | manifest.srcFile 'config/debug/AndroidManifest_SDK23.xml' |
| 250 | } |
| 251 | /*sourceSets.debugAsan { |
| 252 | manifest.srcFile 'config/debug/AndroidManifest_SDK23.xml' |
| 253 | }*/ |
| 254 | sourceSets.release { |
| 255 | manifest.srcFile 'config/release/AndroidManifest_SDK23.xml' |
| 256 | } |
| 257 | minSdkVersion 23 |
| 258 | ext { |
| 259 | abiVersionCode = 7 |
| 260 | } |
| 261 | } |
| 262 | x64_SDK23 { |
| 263 | ndk { |
| 264 | abiFilters "x86_64" |
| 265 | } |
| 266 | sourceSets.debug { |
| 267 | manifest.srcFile 'config/debug/AndroidManifest_SDK23.xml' |
| 268 | } |
| 269 | sourceSets.release { |
| 270 | manifest.srcFile 'config/release/AndroidManifest_SDK23.xml' |
| 271 | } |
| 272 | minSdkVersion 23 |
| 273 | ext { |
| 274 | abiVersionCode = 8 |
| 275 | } |
| 276 | } |
| 277 | afat { |
| 278 | sourceSets.debug { |
| 279 | manifest.srcFile 'config/debug/AndroidManifest_SDK23.xml' |
| 280 | } |
| 281 | /*sourceSets.debugAsan { |
| 282 | manifest.srcFile 'config/debug/AndroidManifest_SDK23.xml' |
| 283 | }*/ |
| 284 | sourceSets.release { |
| 285 | manifest.srcFile 'config/release/AndroidManifest_SDK23.xml' |
| 286 | } |
| 287 | ext { |
| 288 | abiVersionCode = 0 |
| 289 | } |
| 290 | } |
| 291 | } |
| 292 |
| 293 | defaultConfig.versionCode = 10 * 1838 |
| 294 |
| 295 | applicationVariants.all { variant -> |
| 296 | variant.outputs.all { output -> |
| 297 | outputFileName = "app.apk" |
| 298 | output.getProcessManifestProvider().get().doLast { |
| 299 | def abiVersion = variant.productFlavors.get(0).abiVersionCode |
| 300 |
| 301 | def outputDir = manifestOutputDirectory |
| 302 | File directory |
| 303 | if (outputDir instanceof File) { |
| 304 | directory = outputDir |
| 305 | } else { |
| 306 | directory = outputDir.get().asFile |
| 307 | } |
| 308 |
| 309 | String manifestPath = directory.toString() + "/AndroidManifest.xml" |
| 310 | def manifestContent = file(manifestPath).getText() |
| 311 |
| 312 | manifestContent = manifestContent.replace(String.format('android:versionCode="%d"', defaultConfig.versionCode), String.format('android:versionCode="%s"', defaultConfig.versionCode + abiVersion)) |
| 313 | file(manifestPath).write(manifestContent) |
| 314 | } |
| 315 | } |
| 316 | } |
| 317 |
| 318 | variantFilter { variant -> |
| 319 | def names = variant.flavors*.name |
| 320 | if (variant.buildType.name != "release" && !names.contains("afat")) { |
| 321 | setIgnore(true) |
| 322 | } |
| 323 | } |
| 324 |
| 325 | defaultConfig { |
| 326 | minSdkVersion 16 |
| 327 | targetSdkVersion 28 |
| 328 | versionName "5.13.1.4" |
| 329 |
| 330 | vectorDrawables.generatedDensities = ['mdpi', 'hdpi', 'xhdpi', 'xxhdpi'] |
| 331 |
| 332 | externalNativeBuild { |
| 333 | ndkBuild { |
| 334 | arguments "NDK_APPLICATION_MK:=jni/Application.mk", "APP_PLATFORM:=android-16", "--jobs=8" |
| 335 | abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64" |
| 336 | } |
| 337 | } |
| 338 |
| 339 | manifestPlaceholders = [applicationClassName: "ApplicationLoader"] |
| 340 | } |
| 341 | } |
| 342 |
| 343 | apply plugin: 'com.google.gms.google-services' |
| 344 |