ByeDPIAndroid/app/build.gradle.kts

104 lines
3.1 KiB
Plaintext
Raw Normal View History

2024-02-22 18:06:02 +00:00
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
}
android {
namespace = "io.github.dovecoteescapee.byedpi"
compileSdk = 34
defaultConfig {
applicationId = "io.github.dovecoteescapee.byedpi"
minSdk = 21
2024-02-22 18:06:02 +00:00
targetSdk = 34
versionCode = 9
versionName = "1.1.1"
2024-02-22 18:06:02 +00:00
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
ndk {
abiFilters.add("armeabi-v7a")
abiFilters.add("arm64-v8a")
abiFilters.add("x86")
abiFilters.add("x86_64")
}
2024-02-22 18:06:02 +00:00
}
buildFeatures {
buildConfig = true
}
2024-02-22 18:06:02 +00:00
buildTypes {
release {
buildConfigField("String", "VERSION_NAME", "\"${defaultConfig.versionName}\"")
2024-02-22 18:06:02 +00:00
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
debug {
buildConfigField("String", "VERSION_NAME", "\"${defaultConfig.versionName}-debug\"")
}
2024-02-22 18:06:02 +00:00
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
externalNativeBuild {
cmake {
path = file("src/main/cpp/CMakeLists.txt")
version = "3.22.1"
}
}
buildFeatures {
viewBinding = true
}
2024-08-12 14:31:48 +00:00
// https://android.izzysoft.de/articles/named/iod-scan-apkchecks?lang=en#blobs
dependenciesInfo {
// Disables dependency metadata when building APKs.
includeInApk = false
// Disables dependency metadata when building Android App Bundles.
includeInBundle = false
}
2024-02-22 18:06:02 +00:00
}
dependencies {
2024-08-04 22:21:39 +00:00
implementation("androidx.fragment:fragment-ktx:1.8.2")
implementation("androidx.core:core-ktx:1.13.1")
implementation("androidx.appcompat:appcompat:1.7.0")
2024-02-22 18:06:02 +00:00
implementation("androidx.preference:preference-ktx:1.2.1")
implementation("com.takisoft.preferencex:preferencex:1.1.0")
2024-08-04 22:21:39 +00:00
implementation("com.google.android.material:material:1.12.0")
2024-02-22 18:06:02 +00:00
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
2024-08-04 22:21:39 +00:00
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.8.4")
implementation("androidx.lifecycle:lifecycle-service:2.8.4")
2024-02-22 18:06:02 +00:00
testImplementation("junit:junit:4.13.2")
2024-08-04 22:21:39 +00:00
androidTestImplementation("androidx.test.ext:junit:1.2.1")
androidTestImplementation("androidx.test.espresso:espresso-core:3.6.1")
2024-02-22 18:06:02 +00:00
}
tasks.register<Exec>("runNdkBuild") {
group = "build"
val ndkDir = android.ndkDirectory
executable = if (System.getProperty("os.name").startsWith("Windows", ignoreCase = true)) {
"$ndkDir\\ndk-build.cmd"
} else {
"$ndkDir/ndk-build"
}
setArgs(listOf(
"NDK_PROJECT_PATH=build/intermediates/ndkBuild",
"NDK_LIBS_OUT=src/main/jniLibs",
"APP_BUILD_SCRIPT=src/main/jni/Android.mk",
"NDK_APPLICATION_MK=src/main/jni/Application.mk"
))
println("Command: $commandLine")
2024-02-22 18:06:02 +00:00
}
tasks.preBuild {
dependsOn("runNdkBuild")
}