2017-08-02 15:39:38 +02:00
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
|
|
|
|
android {
|
2018-08-18 15:50:06 +02:00
|
|
|
compileSdkVersion 27
|
|
|
|
buildToolsVersion '28.0.2'
|
2017-08-02 15:39:38 +02:00
|
|
|
defaultConfig {
|
|
|
|
applicationId "com.m2049r.xmrwallet"
|
|
|
|
minSdkVersion 21
|
2018-08-18 15:50:06 +02:00
|
|
|
targetSdkVersion 27
|
2018-09-17 17:58:24 +02:00
|
|
|
versionCode 122
|
|
|
|
versionName "1.7.2 'OpenAlias'"
|
2017-08-02 15:39:38 +02:00
|
|
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
|
|
|
externalNativeBuild {
|
|
|
|
cmake {
|
|
|
|
cppFlags "-std=c++11"
|
|
|
|
arguments '-DANDROID_STL=c++_shared'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
buildTypes {
|
|
|
|
release {
|
|
|
|
minifyEnabled false
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
|
|
}
|
2018-01-16 18:55:36 +01:00
|
|
|
debug {
|
|
|
|
applicationIdSuffix ".debug"
|
|
|
|
}
|
2017-08-02 15:39:38 +02:00
|
|
|
}
|
|
|
|
externalNativeBuild {
|
|
|
|
cmake {
|
|
|
|
path "CMakeLists.txt"
|
|
|
|
}
|
|
|
|
}
|
2018-01-23 21:35:26 +01:00
|
|
|
|
|
|
|
splits {
|
|
|
|
abi {
|
|
|
|
enable true
|
|
|
|
reset()
|
2018-02-27 07:22:11 +01:00
|
|
|
include 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
2018-03-29 22:35:31 +02:00
|
|
|
universalApk true
|
2018-01-23 21:35:26 +01:00
|
|
|
}
|
|
|
|
}
|
2018-02-27 07:22:11 +01:00
|
|
|
|
|
|
|
// Map for the version code that gives each ABI a value.
|
|
|
|
def abiCodes = ['armeabi-v7a': 1, 'arm64-v8a': 2, 'x86': 3, 'x86_64': 4]
|
|
|
|
|
2018-08-02 10:51:10 +02:00
|
|
|
// 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)
|
|
|
|
}
|
|
|
|
|
2018-02-27 07:22:11 +01:00
|
|
|
// APKs for the same app that all have the same version information.
|
|
|
|
android.applicationVariants.all { variant ->
|
2018-08-02 10:51:10 +02:00
|
|
|
// Update string resource: available_locales
|
|
|
|
variant.resValue("string", "available_locales", availableLocales.join(","))
|
2018-02-27 07:22:11 +01:00
|
|
|
// Assigns a different version code for each output APK.
|
2018-04-15 16:33:20 +02:00
|
|
|
variant.outputs.all {
|
2018-02-27 07:22:11 +01:00
|
|
|
output ->
|
|
|
|
def abiName = output.getFilter(com.android.build.OutputFile.ABI)
|
|
|
|
output.versionCodeOverride = abiCodes.get(abiName, 0) + 10 * variant.versionCode
|
2018-04-15 16:33:20 +02:00
|
|
|
|
|
|
|
if (abiName == null) abiName = "universal"
|
|
|
|
def v = "${variant.versionName}".replaceFirst(" .*\$", "").replace(".", "x")
|
|
|
|
outputFileName = "$rootProject.ext.apkName-" + v + "_" + abiName + ".apk"
|
2018-02-27 07:22:11 +01:00
|
|
|
}
|
|
|
|
}
|
2017-08-02 15:39:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2018-08-18 15:50:06 +02:00
|
|
|
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"
|
2018-04-15 16:33:20 +02:00
|
|
|
implementation 'me.dm7.barcodescanner:zxing:1.9.8'
|
2017-11-21 20:55:31 +01:00
|
|
|
|
2018-04-15 16:33:20 +02:00
|
|
|
implementation "com.squareup.okhttp3:okhttp:$rootProject.ext.okHttpVersion"
|
|
|
|
implementation "com.jakewharton.timber:timber:$rootProject.ext.timberVersion"
|
2017-11-21 20:55:31 +01:00
|
|
|
|
2018-04-15 16:33:20 +02:00
|
|
|
implementation 'com.nulab-inc:zxcvbn:1.2.3'
|
2017-09-08 22:14:09 +02:00
|
|
|
|
2018-09-17 09:03:07 +02:00
|
|
|
implementation 'dnsjava:dnsjava:2.1.8'
|
|
|
|
implementation 'org.jitsi:dnssecjava:1.1.3'
|
|
|
|
implementation 'org.slf4j:slf4j-nop:1.7.25'
|
|
|
|
|
2018-04-15 16:33:20 +02:00
|
|
|
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'
|
2017-09-08 22:14:09 +02:00
|
|
|
}
|