2020-07-04 06:53:31 -07:00
|
|
|
plugins {
|
|
|
|
id("com.android.application")
|
|
|
|
}
|
|
|
|
|
|
|
|
android {
|
2021-01-22 02:28:53 -08:00
|
|
|
val canary = !Config.version.contains(".")
|
2020-10-03 01:57:53 -07:00
|
|
|
|
2021-03-05 05:09:25 -08:00
|
|
|
val url = Config["DEV_CHANNEL"] ?: if (canary) null
|
|
|
|
else "https://cdn.jsdelivr.net/gh/topjohnwu/magisk-files@${Config.version}/app-release.apk"
|
|
|
|
|
2020-07-04 06:53:31 -07:00
|
|
|
defaultConfig {
|
|
|
|
applicationId = "com.topjohnwu.magisk"
|
|
|
|
versionCode = 1
|
2021-01-22 02:28:53 -08:00
|
|
|
versionName = Config.version
|
2021-01-22 20:45:37 -08:00
|
|
|
buildConfigField("int", "STUB_VERSION", Config.stubVersion)
|
2021-03-05 05:09:25 -08:00
|
|
|
buildConfigField("String", "APK_URL", url?.let { "\"$it\"" } ?: "null" )
|
2020-07-04 06:53:31 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
buildTypes {
|
|
|
|
getByName("release") {
|
|
|
|
isMinifyEnabled = true
|
2020-12-29 02:39:47 -08:00
|
|
|
isShrinkResources = false
|
2020-10-16 13:59:40 +08:00
|
|
|
proguardFiles("proguard-rules.pro")
|
2020-07-04 06:53:31 -07:00
|
|
|
}
|
|
|
|
}
|
2020-08-14 00:40:24 +08:00
|
|
|
|
2021-07-24 03:51:00 -07:00
|
|
|
androidResources {
|
2020-12-29 02:39:47 -08:00
|
|
|
additionalParameters("--package-id", "0x80")
|
|
|
|
}
|
|
|
|
|
2020-08-14 00:40:24 +08:00
|
|
|
dependenciesInfo {
|
|
|
|
includeInApk = false
|
|
|
|
includeInBundle = false
|
|
|
|
}
|
2020-07-04 06:53:31 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))
|
|
|
|
implementation(project(":app:shared"))
|
|
|
|
}
|