2024-01-14 21:31:29 +03:00
|
|
|
plugins {
|
|
|
|
id("com.android.application")
|
|
|
|
id("org.jetbrains.kotlin.android")
|
|
|
|
}
|
|
|
|
|
|
|
|
android {
|
2024-09-11 15:36:11 +03:00
|
|
|
namespace = "io.nekohasekai.sagernet.plugin.naive"
|
2024-01-14 21:31:29 +03:00
|
|
|
|
|
|
|
signingConfigs {
|
|
|
|
create("release") {
|
|
|
|
storeFile = rootProject.file("release.keystore")
|
|
|
|
storePassword = System.getenv("KEYSTORE_PASS")
|
|
|
|
keyAlias = "release"
|
|
|
|
keyPassword = System.getenv("KEYSTORE_PASS")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
buildTypes {
|
|
|
|
getByName("release") {
|
|
|
|
isMinifyEnabled = true
|
|
|
|
signingConfig = signingConfigs.getByName("release")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-09-11 15:36:11 +03:00
|
|
|
buildToolsVersion = "35.0.0"
|
|
|
|
|
|
|
|
compileSdk = 35
|
2024-01-14 21:31:29 +03:00
|
|
|
|
|
|
|
defaultConfig {
|
2024-09-11 15:36:11 +03:00
|
|
|
minSdk = 24
|
|
|
|
targetSdk = 35
|
2024-01-14 21:31:29 +03:00
|
|
|
|
2024-09-11 15:36:11 +03:00
|
|
|
applicationId = "io.nekohasekai.sagernet.plugin.naive"
|
2024-01-14 21:31:29 +03:00
|
|
|
versionCode = System.getenv("APK_VERSION_NAME").removePrefix("v").split(".")[0].toInt()
|
|
|
|
versionName = System.getenv("APK_VERSION_NAME").removePrefix("v")
|
|
|
|
splits.abi {
|
|
|
|
isEnable = true
|
|
|
|
isUniversalApk = false
|
|
|
|
reset()
|
|
|
|
include(System.getenv("APK_ABI"))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
compileOptions {
|
2024-09-11 15:36:11 +03:00
|
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
|
|
targetCompatibility = JavaVersion.VERSION_17
|
2024-01-14 21:31:29 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
lint {
|
|
|
|
showAll = true
|
|
|
|
checkAllWarnings = true
|
|
|
|
checkReleaseBuilds = false
|
|
|
|
warningsAsErrors = true
|
|
|
|
}
|
|
|
|
|
2024-09-11 15:36:11 +03:00
|
|
|
packaging {
|
|
|
|
jniLibs.useLegacyPackaging = true
|
|
|
|
}
|
|
|
|
|
2024-01-14 21:31:29 +03:00
|
|
|
applicationVariants.all {
|
|
|
|
outputs.all {
|
|
|
|
this as com.android.build.gradle.internal.api.BaseVariantOutputImpl
|
|
|
|
outputFileName =
|
|
|
|
outputFileName.replace(project.name, "naiveproxy-plugin-v$versionName")
|
|
|
|
.replace("-release", "")
|
|
|
|
.replace("-oss", "")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
sourceSets.getByName("main") {
|
|
|
|
jniLibs.srcDir("libs")
|
|
|
|
}
|
|
|
|
}
|