mirror of https://github.com/m2049r/xmrwallet.git
114 lines
3.8 KiB
Groovy
114 lines
3.8 KiB
Groovy
apply plugin: 'com.android.application'
|
|
|
|
android {
|
|
compileSdkVersion 27
|
|
buildToolsVersion '28.0.2'
|
|
defaultConfig {
|
|
applicationId "com.m2049r.xmrwallet"
|
|
minSdkVersion 21
|
|
targetSdkVersion 27
|
|
versionCode 130
|
|
versionName "1.8.0 'BulletBroof'"
|
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
|
externalNativeBuild {
|
|
cmake {
|
|
cppFlags "-std=c++11"
|
|
arguments '-DANDROID_STL=c++_shared'
|
|
}
|
|
}
|
|
}
|
|
|
|
flavorDimensions "version"
|
|
productFlavors {
|
|
alpha {
|
|
applicationIdSuffix ".alpha"
|
|
versionNameSuffix " (alpha)"
|
|
}
|
|
beta {
|
|
applicationIdSuffix ".beta"
|
|
versionNameSuffix " (beta)"
|
|
}
|
|
prod {
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
}
|
|
debug {
|
|
applicationIdSuffix ".debug"
|
|
}
|
|
}
|
|
|
|
externalNativeBuild {
|
|
cmake {
|
|
path "CMakeLists.txt"
|
|
}
|
|
}
|
|
|
|
splits {
|
|
abi {
|
|
enable true
|
|
reset()
|
|
include 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
|
universalApk true
|
|
}
|
|
}
|
|
|
|
// Map for the version code that gives each ABI a value.
|
|
def abiCodes = ['armeabi-v7a': 1, 'arm64-v8a': 2, 'x86': 3, 'x86_64': 4]
|
|
|
|
// 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
|
|
//def flavor = output.getFilter(flavor)
|
|
|
|
if (abiName == null) abiName = "universal"
|
|
def v = "${variant.versionName}".replaceFirst(" '.*' ?", "")
|
|
.replace(".", "x")
|
|
.replace("(", "-")
|
|
.replace(")", "")
|
|
outputFileName = "$rootProject.ext.apkName-" + v + "_" + abiName + ".apk"
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
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'
|
|
|
|
implementation 'dnsjava:dnsjava:2.1.8'
|
|
implementation 'org.jitsi:dnssecjava:1.1.3'
|
|
implementation 'org.slf4j:slf4j-nop:1.7.25'
|
|
|
|
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'
|
|
}
|