2017-08-02 07:39:38 -06:00
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
|
|
|
|
android {
|
2021-04-22 12:17:02 -06:00
|
|
|
ndkVersion '17.2.4988734'
|
2017-08-02 07:39:38 -06:00
|
|
|
defaultConfig {
|
|
|
|
applicationId "com.m2049r.xmrwallet"
|
2024-09-15 12:46:00 -06:00
|
|
|
buildToolsVersion = '35.0.0'
|
|
|
|
compileSdk 35
|
2017-08-02 07:39:38 -06:00
|
|
|
minSdkVersion 21
|
2024-08-13 13:43:27 -06:00
|
|
|
targetSdkVersion 35
|
2024-11-08 04:01:35 -07:00
|
|
|
versionCode 4105
|
|
|
|
versionName "4.1.5 'Exolix'"
|
2020-10-15 18:52:08 -06:00
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
2017-08-02 07:39:38 -06:00
|
|
|
externalNativeBuild {
|
|
|
|
cmake {
|
|
|
|
cppFlags "-std=c++11"
|
|
|
|
arguments '-DANDROID_STL=c++_shared'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-10-15 18:52:08 -06:00
|
|
|
bundle {
|
|
|
|
language {
|
|
|
|
enableSplit = false
|
|
|
|
}
|
|
|
|
}
|
2017-08-02 07:39:38 -06:00
|
|
|
|
2024-08-13 09:28:04 -06:00
|
|
|
flavorDimensions = ['type', 'net']
|
2018-09-26 10:55:33 -06:00
|
|
|
productFlavors {
|
2018-11-20 10:20:42 -07:00
|
|
|
mainnet {
|
|
|
|
dimension 'net'
|
|
|
|
}
|
|
|
|
stagenet {
|
|
|
|
dimension 'net'
|
|
|
|
applicationIdSuffix '.stage'
|
2018-11-24 14:28:33 -07:00
|
|
|
versionNameSuffix ' (stage)'
|
2018-11-20 10:20:42 -07:00
|
|
|
}
|
2020-10-15 18:52:08 -06:00
|
|
|
devnet {
|
|
|
|
dimension 'net'
|
|
|
|
applicationIdSuffix '.test'
|
|
|
|
versionNameSuffix ' (test)'
|
|
|
|
}
|
2018-09-26 10:55:33 -06:00
|
|
|
alpha {
|
2018-11-20 10:20:42 -07:00
|
|
|
dimension 'type'
|
|
|
|
applicationIdSuffix '.alpha'
|
|
|
|
versionNameSuffix ' (alpha)'
|
2018-09-26 10:55:33 -06:00
|
|
|
}
|
|
|
|
prod {
|
2018-11-20 10:20:42 -07:00
|
|
|
dimension 'type'
|
2018-09-26 10:55:33 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-08-02 07:39:38 -06:00
|
|
|
buildTypes {
|
|
|
|
release {
|
|
|
|
minifyEnabled false
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
|
|
}
|
2018-01-16 10:55:36 -07:00
|
|
|
debug {
|
|
|
|
applicationIdSuffix ".debug"
|
|
|
|
}
|
2021-02-12 16:01:19 -07:00
|
|
|
applicationVariants.all { variant ->
|
2024-11-01 12:51:28 -06:00
|
|
|
variant.buildConfigField "String", "ID_F", "\"" + getId("ID_F") + "\""
|
2021-02-12 16:01:19 -07:00
|
|
|
}
|
2017-08-02 07:39:38 -06:00
|
|
|
}
|
2018-09-26 10:55:33 -06:00
|
|
|
|
2017-08-02 07:39:38 -06:00
|
|
|
externalNativeBuild {
|
|
|
|
cmake {
|
|
|
|
path "CMakeLists.txt"
|
|
|
|
}
|
|
|
|
}
|
2018-01-23 13:35:26 -07:00
|
|
|
|
|
|
|
splits {
|
|
|
|
abi {
|
|
|
|
enable true
|
|
|
|
reset()
|
2022-08-13 02:20:21 -06:00
|
|
|
include 'armeabi-v7a', 'arm64-v8a', 'x86_64'
|
2018-03-29 14:35:31 -06:00
|
|
|
universalApk true
|
2018-01-23 13:35:26 -07:00
|
|
|
}
|
|
|
|
}
|
2018-02-26 23:22:11 -07: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 02:51:10 -06: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-15 18:52:08 -06:00
|
|
|
if (languageTag != "night")
|
|
|
|
availableLocales.add(languageTag)
|
2018-08-02 02:51:10 -06:00
|
|
|
}
|
|
|
|
|
2018-02-26 23:22:11 -07:00
|
|
|
// APKs for the same app that all have the same version information.
|
|
|
|
android.applicationVariants.all { variant ->
|
2018-08-02 02:51:10 -06:00
|
|
|
// Update string resource: available_locales
|
|
|
|
variant.resValue("string", "available_locales", availableLocales.join(","))
|
2018-02-26 23:22:11 -07:00
|
|
|
// Assigns a different version code for each output APK.
|
2018-04-15 08:33:20 -06:00
|
|
|
variant.outputs.all {
|
2018-02-26 23:22:11 -07:00
|
|
|
output ->
|
|
|
|
def abiName = output.getFilter(com.android.build.OutputFile.ABI)
|
2020-10-19 15:44:40 -06:00
|
|
|
output.versionCodeOverride = abiCodes.get(abiName, 0) + 10 * versionCode
|
2018-04-15 08:33:20 -06:00
|
|
|
|
|
|
|
if (abiName == null) abiName = "universal"
|
2018-09-26 10:55:33 -06:00
|
|
|
def v = "${variant.versionName}".replaceFirst(" '.*' ?", "")
|
|
|
|
.replace(".", "x")
|
|
|
|
.replace("(", "-")
|
|
|
|
.replace(")", "")
|
2018-04-15 08:33:20 -06:00
|
|
|
outputFileName = "$rootProject.ext.apkName-" + v + "_" + abiName + ".apk"
|
2018-02-26 23:22:11 -07:00
|
|
|
}
|
|
|
|
}
|
2020-09-13 10:34:22 -06:00
|
|
|
|
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
|
|
}
|
2022-05-15 07:57:11 -06:00
|
|
|
namespace 'com.m2049r.xmrwallet'
|
2024-01-13 07:31:14 -07:00
|
|
|
buildFeatures {
|
|
|
|
buildConfig true
|
|
|
|
}
|
2024-01-13 08:14:05 -07:00
|
|
|
|
|
|
|
testOptions {
|
|
|
|
unitTests {
|
|
|
|
all {
|
|
|
|
jvmArgs '--add-opens=java.base/java.lang=ALL-UNNAMED'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-12-03 00:31:20 -07:00
|
|
|
|
|
|
|
lint {
|
|
|
|
disable "MissingTranslation" // Translation is crowd-sourced.
|
|
|
|
}
|
2017-08-02 07:39:38 -06:00
|
|
|
}
|
|
|
|
|
2021-12-05 14:24:26 -07:00
|
|
|
static def getId(name) {
|
|
|
|
Properties props = new Properties()
|
2021-02-12 16:01:19 -07:00
|
|
|
props.load(new FileInputStream(new File('monerujo.id')))
|
|
|
|
return props[name]
|
|
|
|
}
|
|
|
|
|
2017-08-02 07:39:38 -06:00
|
|
|
dependencies {
|
2024-08-13 09:28:04 -06:00
|
|
|
implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.22"))
|
2023-04-27 15:58:08 -06:00
|
|
|
|
2024-08-13 09:28:04 -06:00
|
|
|
implementation 'androidx.core:core:1.13.1'
|
|
|
|
implementation 'androidx.appcompat:appcompat:1.7.0'
|
2020-10-15 18:52:08 -06:00
|
|
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
2024-01-13 05:59:38 -07:00
|
|
|
implementation 'androidx.recyclerview:recyclerview:1.3.2'
|
2020-10-15 18:52:08 -06:00
|
|
|
implementation 'androidx.cardview:cardview:1.0.0'
|
2022-03-09 11:10:30 -07:00
|
|
|
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
2023-04-26 00:39:30 -06:00
|
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
2023-08-28 11:24:45 -06:00
|
|
|
implementation 'androidx.preference:preference:1.2.1'
|
2022-03-09 11:10:30 -07:00
|
|
|
|
2024-08-13 09:28:04 -06:00
|
|
|
implementation 'com.google.android.material:material:1.12.0'
|
2017-11-21 12:55:31 -07:00
|
|
|
|
2020-10-15 18:52:08 -06:00
|
|
|
implementation 'me.dm7.barcodescanner:zxing:1.9.8'
|
2024-01-13 07:58:00 -07:00
|
|
|
implementation "com.squareup.okhttp3:okhttp:4.12.0"
|
|
|
|
implementation "io.github.rburgst:okhttp-digest:3.1.0"
|
2022-03-09 11:10:30 -07:00
|
|
|
implementation "com.jakewharton.timber:timber:5.0.1"
|
2017-11-21 12:55:31 -07:00
|
|
|
|
2021-12-05 14:24:26 -07:00
|
|
|
implementation 'info.guardianproject.netcipher:netcipher:2.1.0'
|
|
|
|
//implementation 'info.guardianproject.netcipher:netcipher-okhttp3:2.1.0'
|
|
|
|
implementation fileTree(dir: 'libs/classes', include: ['*.jar'])
|
2024-01-13 07:58:00 -07:00
|
|
|
implementation 'com.nulab-inc:zxcvbn:1.8.2'
|
2017-09-08 14:14:09 -06:00
|
|
|
|
2024-01-13 09:33:23 -07:00
|
|
|
implementation 'dnsjava:dnsjava:3.5.3'
|
2024-01-13 07:58:00 -07:00
|
|
|
implementation 'org.slf4j:slf4j-nop:2.0.11'
|
2019-01-10 10:58:37 -07:00
|
|
|
implementation 'com.github.brnunes:swipeablerecyclerview:1.0.2'
|
2018-09-17 01:03:07 -06:00
|
|
|
|
2021-12-05 14:24:26 -07:00
|
|
|
//noinspection GradleDependency
|
2022-03-09 11:10:30 -07:00
|
|
|
testImplementation "junit:junit:4.13.2"
|
|
|
|
testImplementation "org.mockito:mockito-all:1.10.19"
|
2024-01-13 07:58:00 -07:00
|
|
|
testImplementation "com.squareup.okhttp3:mockwebserver:4.12.0"
|
|
|
|
testImplementation 'org.json:json:20231013'
|
2022-03-09 11:10:30 -07:00
|
|
|
testImplementation 'net.jodah:concurrentunit:0.4.6'
|
|
|
|
|
2024-01-13 07:58:00 -07:00
|
|
|
compileOnly 'org.projectlombok:lombok:1.18.30'
|
|
|
|
annotationProcessor 'org.projectlombok:lombok:1.18.30'
|
2017-09-08 14:14:09 -06:00
|
|
|
}
|