2022-09-07 19:31:20 +00:00
|
|
|
apply plugin: 'com.android.application'
|
2022-09-17 19:35:31 +00:00
|
|
|
apply plugin: "androidx.navigation.safeargs"
|
2023-12-06 16:49:36 +00:00
|
|
|
apply plugin: 'kotlin-android'
|
2022-09-07 19:31:20 +00:00
|
|
|
|
|
|
|
android {
|
2024-09-08 11:30:36 +00:00
|
|
|
ndkVersion '27.1.12297006'
|
2022-09-07 19:31:20 +00:00
|
|
|
defaultConfig {
|
2022-09-17 20:14:08 +00:00
|
|
|
applicationId "net.mynero.wallet"
|
2023-12-10 16:43:58 +00:00
|
|
|
minSdkVersion 22
|
2023-07-09 23:31:26 +00:00
|
|
|
targetSdkVersion 34
|
2024-09-08 11:30:36 +00:00
|
|
|
compileSdk 34
|
|
|
|
versionCode 50900
|
|
|
|
versionName "0.5.9 'Fluorine Fermi'"
|
2022-09-07 19:31:20 +00:00
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
|
|
externalNativeBuild {
|
|
|
|
cmake {
|
|
|
|
cppFlags "-std=c++11"
|
|
|
|
arguments '-DANDROID_STL=c++_shared'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
bundle {
|
|
|
|
language {
|
|
|
|
enableSplit = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-12-02 19:37:12 +00:00
|
|
|
flavorDimensions 'type'
|
2022-09-07 19:31:20 +00:00
|
|
|
productFlavors {
|
2022-11-11 05:27:03 +00:00
|
|
|
beta {
|
2023-12-02 19:37:12 +00:00
|
|
|
dimension 'type'
|
2022-11-11 05:27:03 +00:00
|
|
|
applicationIdSuffix '.beta'
|
|
|
|
versionNameSuffix ' (beta)'
|
2022-09-07 19:31:20 +00:00
|
|
|
}
|
|
|
|
prod {
|
|
|
|
dimension 'type'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
buildTypes {
|
|
|
|
release {
|
|
|
|
minifyEnabled false
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
|
|
}
|
|
|
|
debug {
|
|
|
|
applicationIdSuffix ".debug"
|
|
|
|
}
|
|
|
|
applicationVariants.all { variant ->
|
|
|
|
variant.buildConfigField "String", "ID_A", "\"" + getId("ID_A") + "\""
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
externalNativeBuild {
|
|
|
|
cmake {
|
|
|
|
path "CMakeLists.txt"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
splits {
|
|
|
|
abi {
|
|
|
|
enable true
|
|
|
|
reset()
|
|
|
|
include 'armeabi-v7a', 'arm64-v8a', '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", "-")
|
|
|
|
if (languageTag != "night")
|
|
|
|
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 * versionCode
|
|
|
|
|
|
|
|
if (abiName == null) abiName = "universal"
|
|
|
|
def v = "${variant.versionName}".replaceFirst(" '.*' ?", "")
|
|
|
|
.replace(".", "x")
|
|
|
|
.replace("(", "-")
|
|
|
|
.replace(")", "")
|
|
|
|
outputFileName = "$rootProject.ext.apkName-" + v + "_" + abiName + ".apk"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
compileOptions {
|
2023-12-06 16:49:36 +00:00
|
|
|
sourceCompatibility JavaVersion.VERSION_17
|
|
|
|
targetCompatibility JavaVersion.VERSION_17
|
2022-09-07 19:31:20 +00:00
|
|
|
}
|
2022-09-17 20:14:08 +00:00
|
|
|
namespace 'net.mynero.wallet'
|
2022-09-07 19:43:41 +00:00
|
|
|
buildFeatures {
|
|
|
|
viewBinding true
|
|
|
|
}
|
2022-09-07 19:31:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static def getId(name) {
|
|
|
|
Properties props = new Properties()
|
2022-09-18 06:39:59 +00:00
|
|
|
props.load(new FileInputStream(new File('mynero.id')))
|
2022-09-07 19:31:20 +00:00
|
|
|
return props[name]
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2023-12-10 16:43:58 +00:00
|
|
|
// Android stuff
|
2024-09-08 11:30:36 +00:00
|
|
|
implementation 'androidx.core:core-ktx:1.13.1'
|
|
|
|
implementation 'androidx.appcompat:appcompat:1.7.0'
|
2023-12-06 16:49:36 +00:00
|
|
|
implementation 'androidx.recyclerview:recyclerview:1.3.2'
|
2022-09-07 19:31:20 +00:00
|
|
|
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
2023-04-28 22:38:45 +00:00
|
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
2023-12-06 16:49:36 +00:00
|
|
|
implementation 'androidx.preference:preference-ktx:1.2.1'
|
2024-09-08 11:30:36 +00:00
|
|
|
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.8.5'
|
|
|
|
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.5'
|
|
|
|
implementation 'androidx.navigation:navigation-fragment-ktx:2.8.0'
|
|
|
|
implementation 'androidx.navigation:navigation-ui-ktx:2.8.0'
|
|
|
|
implementation 'androidx.core:core-ktx:1.13.1'
|
2023-12-10 16:43:58 +00:00
|
|
|
|
|
|
|
// Slide to Send tx sliders
|
|
|
|
implementation 'com.ncorti:slidetoact:0.9.0'
|
|
|
|
|
|
|
|
// QR Code stuff
|
|
|
|
implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
|
2022-09-07 19:31:20 +00:00
|
|
|
|
2023-12-09 01:08:05 +00:00
|
|
|
// Tor
|
|
|
|
def vTor = '4.8.6-0'
|
|
|
|
def vKmpTor = '1.4.4'
|
|
|
|
implementation "io.matthewnelson.kotlin-components:kmp-tor:$vTor-$vKmpTor"
|
2023-04-28 22:48:46 +00:00
|
|
|
}
|