db6f5d9036
Changelog: Rebuilt the core, provider, and application layers Changelog-Type: feat
116 lines
3.2 KiB
Kotlin
116 lines
3.2 KiB
Kotlin
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|
import java.util.Properties
|
|
|
|
plugins {
|
|
id("com.android.application")
|
|
id("dev.flutter.flutter-gradle-plugin")
|
|
id("com.google.gms.google-services")
|
|
id("com.google.firebase.crashlytics")
|
|
}
|
|
|
|
val localProperties = Properties().apply {
|
|
val localPropertiesFile = rootProject.file("local.properties")
|
|
if (localPropertiesFile.exists()) {
|
|
localPropertiesFile.inputStream().use { load(it) }
|
|
}
|
|
}
|
|
|
|
val releaseStoreFile = file("keystore.jks")
|
|
val releaseStorePassword = localProperties.getProperty("storePassword")
|
|
val releaseKeyAlias = localProperties.getProperty("keyAlias")
|
|
val releaseKeyPassword = localProperties.getProperty("keyPassword")
|
|
val hasReleaseSigning = releaseStoreFile.exists() &&
|
|
releaseStorePassword != null &&
|
|
releaseKeyAlias != null &&
|
|
releaseKeyPassword != 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 (hasReleaseSigning) {
|
|
create("release") {
|
|
storeFile = releaseStoreFile
|
|
storePassword = releaseStorePassword
|
|
keyAlias = releaseKeyAlias
|
|
keyPassword = releaseKeyPassword
|
|
}
|
|
}
|
|
}
|
|
|
|
packaging {
|
|
jniLibs {
|
|
useLegacyPackaging = true
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
debug {
|
|
isMinifyEnabled = false
|
|
applicationIdSuffix = ".dev"
|
|
}
|
|
|
|
release {
|
|
isMinifyEnabled = true
|
|
isShrinkResources = true
|
|
if (hasReleaseSigning) {
|
|
signingConfig = signingConfigs.getByName("release")
|
|
} else {
|
|
signingConfig = signingConfigs.getByName("debug")
|
|
applicationIdSuffix = ".dev"
|
|
}
|
|
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro",
|
|
)
|
|
}
|
|
}
|
|
|
|
sourceSets {
|
|
// Unit tests live under android/tests/ instead of each module's src/test.
|
|
getByName("test").java.setSrcDirs(listOf("../tests/app"))
|
|
}
|
|
}
|
|
|
|
kotlin {
|
|
compilerOptions {
|
|
jvmTarget.set(JvmTarget.JVM_17)
|
|
}
|
|
}
|
|
|
|
flutter {
|
|
source = "../.."
|
|
}
|
|
|
|
dependencies {
|
|
implementation(project(":service"))
|
|
implementation(project(":common"))
|
|
implementation(project(":core"))
|
|
implementation(libs.core.splashscreen)
|
|
implementation(libs.gson)
|
|
implementation(libs.smali.dexlib2) {
|
|
exclude(group = "com.google.guava", module = "guava")
|
|
}
|
|
implementation(platform(libs.firebase.bom))
|
|
implementation(libs.firebase.crashlytics.ndk)
|
|
implementation(libs.firebase.analytics)
|
|
testImplementation(libs.junit)
|
|
testImplementation(libs.kotlinx.coroutines.test)
|
|
}
|