Skip to content
Snippets Groups Projects
Commit c7d33c68 authored by Kr328's avatar Kr328
Browse files

Chore: clean build gradle

parent b2661d31
No related branches found
No related tags found
No related merge requests found
...@@ -34,29 +34,19 @@ subprojects { ...@@ -34,29 +34,19 @@ subprojects {
apply(plugin = if (isApp) "com.android.application" else "com.android.library") apply(plugin = if (isApp) "com.android.application" else "com.android.library")
extensions.configure<BaseExtension> { extensions.configure<BaseExtension> {
val minSdkVersion = 21
val targetSdkVersion = 31
val buildVersionCode = 205003
val buildVersionName = "2.5.3"
val defaultDimension = "feature"
ndkVersion = "23.0.7599858"
compileSdkVersion(targetSdkVersion)
defaultConfig { defaultConfig {
if (isApp) { if (isApp) {
applicationId = "com.github.kr328.clash" applicationId = "com.github.kr328.clash"
} }
minSdk = minSdkVersion minSdk = 21
targetSdk = targetSdkVersion targetSdk = 31
versionName = buildVersionName versionName = "2.5.3"
versionCode = buildVersionCode versionCode = 205003
resValue("string", "release_name", "v$buildVersionName") resValue("string", "release_name", "v$versionName")
resValue("integer", "release_code", "$buildVersionCode") resValue("integer", "release_code", "$versionCode")
externalNativeBuild { externalNativeBuild {
cmake { cmake {
...@@ -71,6 +61,10 @@ subprojects { ...@@ -71,6 +61,10 @@ subprojects {
} }
} }
ndkVersion = "23.0.7599858"
compileSdkVersion(defaultConfig.targetSdk!!)
if (isApp) { if (isApp) {
packagingOptions { packagingOptions {
excludes.add("DebugProbesKt.bin") excludes.add("DebugProbesKt.bin")
...@@ -78,11 +72,11 @@ subprojects { ...@@ -78,11 +72,11 @@ subprojects {
} }
productFlavors { productFlavors {
flavorDimensions(defaultDimension) flavorDimensions("feature")
create("foss") { create("foss") {
isDefault = true isDefault = true
dimension = defaultDimension dimension = flavorDimensionList[0]
versionNameSuffix = ".foss" versionNameSuffix = ".foss"
buildConfigField("boolean", "PREMIUM", "Boolean.parseBoolean(\"false\")") buildConfigField("boolean", "PREMIUM", "Boolean.parseBoolean(\"false\")")
...@@ -92,7 +86,7 @@ subprojects { ...@@ -92,7 +86,7 @@ subprojects {
} }
} }
create("premium") { create("premium") {
dimension = defaultDimension dimension = flavorDimensionList[0]
versionNameSuffix = ".premium" versionNameSuffix = ".premium"
buildConfigField("boolean", "PREMIUM", "Boolean.parseBoolean(\"true\")") buildConfigField("boolean", "PREMIUM", "Boolean.parseBoolean(\"true\")")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment