mirror of
https://codeberg.org/r4v3r23/mysu.git
synced 2024-11-14 01:21:54 +00:00
139 lines
No EOL
4.3 KiB
Groovy
139 lines
No EOL
4.3 KiB
Groovy
apply plugin: 'com.android.application'
|
|
apply plugin: "androidx.navigation.safeargs"
|
|
apply plugin: 'kotlin-android'
|
|
|
|
android {
|
|
compileSdkVersion 34
|
|
buildToolsVersion '30.0.3'
|
|
ndkVersion '17.2.4988734'
|
|
defaultConfig {
|
|
applicationId "net.mynero.wallet"
|
|
minSdkVersion 22
|
|
targetSdkVersion 34
|
|
versionCode 50800
|
|
versionName "0.5.8 'Fluorine Fermi'"
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
externalNativeBuild {
|
|
cmake {
|
|
cppFlags "-std=c++11"
|
|
arguments '-DANDROID_STL=c++_shared'
|
|
}
|
|
}
|
|
}
|
|
bundle {
|
|
language {
|
|
enableSplit = false
|
|
}
|
|
}
|
|
|
|
flavorDimensions 'type'
|
|
productFlavors {
|
|
beta {
|
|
dimension 'type'
|
|
applicationIdSuffix '.beta'
|
|
versionNameSuffix ' (beta)'
|
|
}
|
|
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 {
|
|
sourceCompatibility JavaVersion.VERSION_17
|
|
targetCompatibility JavaVersion.VERSION_17
|
|
}
|
|
namespace 'net.mynero.wallet'
|
|
buildFeatures {
|
|
viewBinding true
|
|
}
|
|
}
|
|
|
|
static def getId(name) {
|
|
Properties props = new Properties()
|
|
props.load(new FileInputStream(new File('mynero.id')))
|
|
return props[name]
|
|
}
|
|
|
|
dependencies {
|
|
// Android stuff
|
|
implementation 'androidx.core:core-ktx:1.12.0'
|
|
implementation 'androidx.appcompat:appcompat:1.6.1'
|
|
implementation 'androidx.recyclerview:recyclerview:1.3.2'
|
|
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
|
implementation 'androidx.preference:preference-ktx:1.2.1'
|
|
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.6.2'
|
|
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2'
|
|
implementation 'androidx.navigation:navigation-fragment-ktx:2.7.5'
|
|
implementation 'androidx.navigation:navigation-ui-ktx:2.7.5'
|
|
implementation 'androidx.core:core-ktx:1.12.0'
|
|
|
|
// Slide to Send tx sliders
|
|
implementation 'com.ncorti:slidetoact:0.9.0'
|
|
|
|
// QR Code stuff
|
|
implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
|
|
|
|
// Tor
|
|
def vTor = '4.8.6-0'
|
|
def vKmpTor = '1.4.4'
|
|
implementation "io.matthewnelson.kotlin-components:kmp-tor:$vTor-$vKmpTor"
|
|
} |