Files
Archive/igniter/app/build.gradle
2024-03-05 02:32:38 -08:00

125 lines
4.2 KiB
Groovy

apply plugin: 'com.android.application'
ext.versionMajor = 0
ext.versionMinor = 11
ext.versionPatch = 0
ext.versionClassifier = "beta" // or null
ext.isSnapshot = true // set to false when publishing new releases
ext.minimumSdkVersion = 23
ext.targetSdkVersion = 31
private Integer GenerateVersionCode() {
return ext.minimumSdkVersion * 10000000 + ext.versionMajor * 10000 + ext.versionMinor * 100 + ext.versionPatch
}
private String GenerateVersionName() {
String versionName = "${ext.versionMajor}.${ext.versionMinor}.${ext.versionPatch}"
if (ext.versionClassifier != null) {
versionName += "-" + ext.versionClassifier
}
if (ext.isSnapshot) {
versionName += "-" + "SNAPSHOT"
}
return versionName;
}
android {
ndkVersion "23.1.7779620"
compileSdkVersion targetSdkVersion
applicationVariants.all { variant ->
variant.resValue "string", "versionName", variant.versionName
}
defaultConfig {
applicationId "io.github.trojan_gfw.igniter"
minSdkVersion project.ext.minimumSdkVersion
targetSdkVersion project.ext.targetSdkVersion
versionCode GenerateVersionCode()
versionName GenerateVersionName()
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
ndk {
abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
}
externalNativeBuild {
cmake {
arguments "-DANDROID_CPP_FEATURES=rtti exceptions"
}
}
archivesBaseName = "$applicationId-v$versionName-$versionCode"
}
buildTypes {
debug {
applicationIdSuffix '.debug'
debuggable true
}
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'),
'proguard-rules.pro'
}
}
externalNativeBuild {
cmake {
path file('src/main/cpp/CMakeLists.txt')
}
}
compileOptions {
// Flag to enable support for the new language APIs
coreLibraryDesugaringEnabled true
}
packagingOptions {
jniLibs {
// During installation, the installer decompresses the libraries, and the linker loads
// the decompressed libraries at runtime; in this case, the APK would be smaller, but
// installation time might be slightly longer.
// We optimize for size to make users happy
useLegacyPackaging = true
keepDebugSymbols += ['*/armeabi-v7a/libgojni.so', '*/arm64-v8a/libgojni.so', '*/x86/libgojni.so', '*/x86_64/libgojni.so']
}
}
splits {
abi {
enable true
reset()
include "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
universalApk true
}
}
}
repositories {
flatDir {
dirs 'src/libs'
}
}
dependencies {
implementation 'com.github.stealthcopter:AndroidNetworkTools:0.4.5.3'
implementation 'com.google.android.material:material:1.6.0-alpha01'
implementation 'androidx.activity:activity:1.4.0'
implementation 'androidx.fragment:fragment:1.4.0'
implementation 'androidx.appcompat:appcompat:1.4.0'
implementation 'androidx.recyclerview:recyclerview:1.3.0-alpha01'
implementation 'androidx.constraintlayout:constraintlayout:2.1.2'
implementation 'androidx.core:core:1.8.0-alpha02'
implementation 'androidx.preference:preference:1.2.0-rc01'
implementation 'com.google.code.gson:gson:2.8.9'
// CameraX core library using camera2 implementation
implementation 'androidx.camera:camera-camera2:1.1.0-alpha12'
// CameraX Lifecycle Library
implementation 'androidx.camera:camera-lifecycle:1.1.0-alpha12'
// CameraX View class
implementation 'androidx.camera:camera-view:1.0.0-alpha32'
implementation 'com.google.mlkit:barcode-scanning:17.0.1'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
testImplementation 'junit:junit:4.13.1'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
api(name: 'golibs', ext: 'aar')
}