e684beb3f3
Support core status check and force restart Optimize proxies page and access page Update flutter and pub dependencies
97 lines
2.5 KiB
Kotlin
97 lines
2.5 KiB
Kotlin
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|
import java.util.Properties
|
|
|
|
plugins {
|
|
id("com.android.application")
|
|
id("kotlin-android")
|
|
id("dev.flutter.flutter-gradle-plugin")
|
|
}
|
|
|
|
val localPropertiesFile = rootProject.file("local.properties")
|
|
val localProperties = Properties().apply {
|
|
if (localPropertiesFile.exists()) {
|
|
localPropertiesFile.inputStream().use { load(it) }
|
|
}
|
|
}
|
|
|
|
val mStoreFile: File = file("keystore.jks")
|
|
val mStorePassword: String? = localProperties.getProperty("storePassword")
|
|
val mKeyAlias: String? = localProperties.getProperty("keyAlias")
|
|
val mKeyPassword: String? = localProperties.getProperty("keyPassword")
|
|
val isRelease = mStoreFile.exists()
|
|
&& mStorePassword != null
|
|
&& mKeyAlias != null
|
|
&& mKeyPassword != null
|
|
|
|
android {
|
|
namespace = "com.follow.clash"
|
|
compileSdk = libs.versions.compileSdk.get().toInt()
|
|
ndkVersion = libs.versions.ndkVersion.get()
|
|
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
|
|
defaultConfig {
|
|
applicationId = "com.follow.clash"
|
|
minSdk = flutter.minSdkVersion
|
|
targetSdk = libs.versions.targetSdk.get().toInt()
|
|
versionCode = flutter.versionCode
|
|
versionName = flutter.versionName
|
|
}
|
|
|
|
signingConfigs {
|
|
if (isRelease) {
|
|
create("release") {
|
|
storeFile = mStoreFile
|
|
storePassword = mStorePassword
|
|
keyAlias = mKeyAlias
|
|
keyPassword = mKeyPassword
|
|
}
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
debug {
|
|
isMinifyEnabled = false
|
|
applicationIdSuffix = ".debug"
|
|
}
|
|
|
|
release {
|
|
isMinifyEnabled = true
|
|
isShrinkResources = true
|
|
signingConfig = if (isRelease) {
|
|
signingConfigs.getByName("release")
|
|
} else {
|
|
signingConfigs.getByName("debug")
|
|
}
|
|
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro"
|
|
)
|
|
}
|
|
}
|
|
}
|
|
|
|
kotlin {
|
|
compilerOptions {
|
|
jvmTarget.set(JvmTarget.JVM_17)
|
|
}
|
|
}
|
|
|
|
flutter {
|
|
source = "../.."
|
|
}
|
|
|
|
dependencies {
|
|
implementation(project(":service"))
|
|
implementation(project(":common"))
|
|
implementation(libs.core.splashscreen)
|
|
implementation(libs.gson)
|
|
implementation(libs.smali.dexlib2) {
|
|
exclude(group = "com.google.guava", module = "guava")
|
|
}
|
|
} |