2017-08-02 15:39:38 +02:00
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
|
|
|
|
android {
|
2021-04-15 19:10:01 +02:00
|
|
|
compileSdkVersion 30
|
2021-05-06 00:03:39 +02:00
|
|
|
buildToolsVersion '30.0.3'
|
2021-04-22 20:17:02 +02:00
|
|
|
ndkVersion '17.2.4988734'
|
2017-08-02 15:39:38 +02:00
|
|
|
defaultConfig {
|
|
|
|
applicationId "com.m2049r.xmrwallet"
|
|
|
|
minSdkVersion 21
|
2021-04-15 19:10:01 +02:00
|
|
|
targetSdkVersion 30
|
2021-10-27 08:37:52 +02:00
|
|
|
versionCode 1102
|
|
|
|
versionName "2.1.2 'Vertant'"
|
2020-10-16 02:52:08 +02:00
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
2017-08-02 15:39:38 +02:00
|
|
|
externalNativeBuild {
|
|
|
|
cmake {
|
|
|
|
cppFlags "-std=c++11"
|
|
|
|
arguments '-DANDROID_STL=c++_shared'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-10-16 02:52:08 +02:00
|
|
|
bundle {
|
|
|
|
language {
|
|
|
|
enableSplit = false
|
|
|
|
}
|
|
|
|
}
|
2017-08-02 15:39:38 +02:00
|
|
|
|
2018-11-20 18:20:42 +01:00
|
|
|
flavorDimensions 'type', 'net'
|
2018-09-26 18:55:33 +02:00
|
|
|
productFlavors {
|
2018-11-20 18:20:42 +01:00
|
|
|
mainnet {
|
|
|
|
dimension 'net'
|
|
|
|
}
|
|
|
|
stagenet {
|
|
|
|
dimension 'net'
|
|
|
|
applicationIdSuffix '.stage'
|
2018-11-24 22:28:33 +01:00
|
|
|
versionNameSuffix ' (stage)'
|
2018-11-20 18:20:42 +01:00
|
|
|
}
|
2020-10-16 02:52:08 +02:00
|
|
|
devnet {
|
|
|
|
dimension 'net'
|
|
|
|
applicationIdSuffix '.test'
|
|
|
|
versionNameSuffix ' (test)'
|
|
|
|
}
|
2018-09-26 18:55:33 +02:00
|
|
|
alpha {
|
2018-11-20 18:20:42 +01:00
|
|
|
dimension 'type'
|
|
|
|
applicationIdSuffix '.alpha'
|
|
|
|
versionNameSuffix ' (alpha)'
|
2018-09-26 18:55:33 +02:00
|
|
|
}
|
|
|
|
prod {
|
2018-11-20 18:20:42 +01:00
|
|
|
dimension 'type'
|
2018-09-26 18:55:33 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-08-02 15:39:38 +02:00
|
|
|
buildTypes {
|
|
|
|
release {
|
|
|
|
minifyEnabled false
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
|
|
}
|
2018-01-16 18:55:36 +01:00
|
|
|
debug {
|
|
|
|
applicationIdSuffix ".debug"
|
|
|
|
}
|
2021-02-13 00:01:19 +01:00
|
|
|
applicationVariants.all { variant ->
|
|
|
|
variant.buildConfigField "String", "ID_A", "\"" + getId("ID_A") + "\""
|
|
|
|
}
|
2017-08-02 15:39:38 +02:00
|
|
|
}
|
2018-09-26 18:55:33 +02:00
|
|
|
|
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-09-27 18:24:22 +02: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", "-")
|
2020-10-16 02:52:08 +02:00
|
|
|
if (languageTag != "night")
|
|
|
|
availableLocales.add(languageTag)
|
2018-08-02 10:51:10 +02:00
|
|
|
}
|
|
|
|
|
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)
|
2020-10-19 23:44:40 +02:00
|
|
|
output.versionCodeOverride = abiCodes.get(abiName, 0) + 10 * versionCode
|
2018-04-15 16:33:20 +02:00
|
|
|
|
|
|
|
if (abiName == null) abiName = "universal"
|
2018-09-26 18:55:33 +02:00
|
|
|
def v = "${variant.versionName}".replaceFirst(" '.*' ?", "")
|
|
|
|
.replace(".", "x")
|
|
|
|
.replace("(", "-")
|
|
|
|
.replace(")", "")
|
2018-04-15 16:33:20 +02:00
|
|
|
outputFileName = "$rootProject.ext.apkName-" + v + "_" + abiName + ".apk"
|
2018-02-27 07:22:11 +01:00
|
|
|
}
|
|
|
|
}
|
2020-09-13 18:34:22 +02:00
|
|
|
|
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
|
|
}
|
2017-08-02 15:39:38 +02:00
|
|
|
}
|
|
|
|
|
2021-02-13 00:01:19 +01:00
|
|
|
def getId(name) {
|
|
|
|
def Properties props = new Properties()
|
|
|
|
props.load(new FileInputStream(new File('monerujo.id')))
|
|
|
|
return props[name]
|
|
|
|
}
|
|
|
|
|
2017-08-02 15:39:38 +02:00
|
|
|
dependencies {
|
2020-10-16 02:52:08 +02:00
|
|
|
implementation 'androidx.core:core:1.3.2'
|
|
|
|
implementation 'androidx.appcompat:appcompat:1.2.0'
|
2021-02-13 00:01:19 +01:00
|
|
|
implementation 'com.google.android.material:material:1.3.0'
|
2020-10-16 02:52:08 +02:00
|
|
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
2021-04-19 18:41:09 +02:00
|
|
|
implementation 'androidx.recyclerview:recyclerview:1.2.0'
|
2020-10-16 02:52:08 +02:00
|
|
|
implementation 'androidx.cardview:cardview:1.0.0'
|
|
|
|
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.2.0-alpha01'
|
2020-11-19 16:36:01 +01:00
|
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
|
2017-11-21 20:55:31 +01:00
|
|
|
|
2020-10-16 02:52:08 +02:00
|
|
|
implementation 'me.dm7.barcodescanner:zxing:1.9.8'
|
2020-10-20 23:31:29 +02:00
|
|
|
implementation "com.squareup.okhttp3:okhttp:4.9.0"
|
2021-04-25 18:24:30 +02:00
|
|
|
implementation "io.github.rburgst:okhttp-digest:2.5"
|
2020-10-20 23:31:29 +02:00
|
|
|
implementation "com.jakewharton.timber:timber:4.7.1"
|
2017-11-21 20:55:31 +01:00
|
|
|
|
2020-10-16 02:52:08 +02:00
|
|
|
implementation 'com.nulab-inc:zxcvbn:1.3.0'
|
2017-09-08 22:14:09 +02:00
|
|
|
|
2020-10-16 02:52:08 +02:00
|
|
|
implementation 'dnsjava:dnsjava:2.1.9'
|
|
|
|
implementation 'org.jitsi:dnssecjava:1.2.0'
|
|
|
|
implementation 'org.slf4j:slf4j-nop:1.7.30'
|
2019-01-10 18:58:37 +01:00
|
|
|
implementation 'com.github.brnunes:swipeablerecyclerview:1.0.2'
|
2018-09-17 09:03:07 +02:00
|
|
|
|
2018-04-15 16:33:20 +02:00
|
|
|
testImplementation "junit:junit:$rootProject.ext.junitVersion"
|
|
|
|
testImplementation "org.mockito:mockito-all:$rootProject.ext.mockitoVersion"
|
2020-10-20 23:31:29 +02:00
|
|
|
testImplementation "com.squareup.okhttp3:mockwebserver:4.9.0"
|
2019-01-10 19:30:59 +01:00
|
|
|
testImplementation 'org.json:json:20180813'
|
|
|
|
testImplementation 'net.jodah:concurrentunit:0.4.4'
|
2020-11-19 16:36:01 +01:00
|
|
|
|
|
|
|
compileOnly 'org.projectlombok:lombok:1.18.16'
|
|
|
|
annotationProcessor 'org.projectlombok:lombok:1.18.16'
|
2017-09-08 22:14:09 +02:00
|
|
|
}
|