apply plugin: 'com.android.application' android { compileSdkVersion 28 buildToolsVersion '28.0.3' defaultConfig { applicationId 'com.wownero.wownerujo' // No more security updates for Android 5 (sdk 21 and 22), so not supported. // https://source.android.com/security/bulletin/2018-03-01 minSdkVersion 23 targetSdkVersion 28 versionCode 1200 versionName '2.6.0.0' // testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" externalNativeBuild { cmake { cppFlags "-std=c++11" arguments '-DANDROID_STL=c++_shared' } } } if(project.hasProperty("RELEASE_STORE_FILE")) { signingConfigs { release { storeFile file(RELEASE_STORE_FILE) storePassword RELEASE_STORE_PASSWORD keyAlias RELEASE_KEY_ALIAS keyPassword RELEASE_KEY_PASSWORD } } } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' if(project.hasProperty("RELEASE_STORE_FILE")) { signingConfig signingConfigs.release } } debug { applicationIdSuffix ".debug" } } externalNativeBuild { cmake { path "CMakeLists.txt" } } // def abiCodes = ['arm64-v8a': 2] def abiCodes = ['armeabi-v7a': 1, 'arm64-v8a': 2, 'x86_64': 4] splits { abi { enable true reset() // include 'arm64-v8a' include 'armeabi-v7a', 'arm64-v8a', 'x86_64' universalApk true } } flavorDimensions "version" productFlavors { // full { // dimension "version" // splits { // abi { // enable true // reset() // include 'armeabi-v7a', 'arm64-v8a', 'x86_64' // universalApk true // } // } // // abiCodes = ['armeabi-v7a': 1, 'arm64-v8a': 2, 'x86_64': 4] // } } // Map for the version code that gives each ABI a value. // Enumerate translated locales def availableLocales = ["en"] new File("app/src/main/res/").eachFileMatch(~/^values-.*/) { file -> def languageTag = file.name.substring(7).replace("-r", "-") availableLocales.add(languageTag) } // APKs for the same app that all have the same version information. android.applicationVariants.all { variant -> // Update string resource: available_locales variant.resValue("string", "available_locales", availableLocales.join(",")) // Assigns a different version code for each output APK. variant.outputs.all { output -> def abiName = output.getFilter(com.android.build.OutputFile.ABI) // output.versionCodeOverride = abiCodes.get(abiName, 0) + 10 * variant.versionCode if (abiName == null) abiName = "universal" def v = "${variant.versionName}".replaceFirst(" .*\$", "").replace(".", "x") outputFileName = "$rootProject.ext.apkName-" + v + "_" + abiName + ".apk" } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } lintOptions { checkReleaseBuilds false // Or, if you prefer, you can continue to check for errors in release builds, // but continue the build even when errors are found: abortOnError false } dexOptions { } } tasks.withType(Test) {enabled = false} dependencies { // implementation 'com.android.support:appcompat-v7:27.1.1' // implementation 'com.android.support:design:27.1.1' // implementation 'com.android.support:support-v4:27.1.1' // implementation 'com.android.support:recyclerview-v7:27.1.1' // implementation 'com.android.support:cardview-v7:27.1.1' implementation "com.android.support:appcompat-v7:$rootProject.ext.supportVersion" implementation "com.android.support:design:$rootProject.ext.supportVersion" implementation "com.android.support:support-v4:$rootProject.ext.supportVersion" implementation "com.android.support:recyclerview-v7:$rootProject.ext.supportVersion" implementation "com.android.support:cardview-v7:$rootProject.ext.supportVersion" implementation 'me.dm7.barcodescanner:zxing:1.9.8' implementation "com.squareup.okhttp3:okhttp:$rootProject.ext.okHttpVersion" implementation "com.jakewharton.timber:timber:$rootProject.ext.timberVersion" implementation 'com.nulab-inc:zxcvbn:1.2.3' testImplementation "junit:junit:$rootProject.ext.junitVersion" testImplementation "org.mockito:mockito-all:$rootProject.ext.mockitoVersion" testImplementation "com.squareup.okhttp3:mockwebserver:$rootProject.ext.okHttpVersion" testImplementation 'org.json:json:20140107' testImplementation 'net.jodah:concurrentunit:0.4.2' }