123 lines
3.5 KiB
Kotlin
123 lines
3.5 KiB
Kotlin
plugins {
|
|
id("com.android.application")
|
|
id("org.jetbrains.kotlin.plugin.compose")
|
|
id("com.google.dagger.hilt.android")
|
|
id("com.google.devtools.ksp")
|
|
}
|
|
|
|
android {
|
|
namespace = "com.zapret2.app"
|
|
compileSdk = 37
|
|
|
|
defaultConfig {
|
|
applicationId = "com.zapret2.app"
|
|
minSdk = 24
|
|
targetSdk = 35
|
|
versionCode = 2010006
|
|
versionName = "2.1.6"
|
|
}
|
|
|
|
signingConfigs {
|
|
create("release") {
|
|
storeFile = file("../keystore.jks")
|
|
storePassword = System.getenv("KEYSTORE_PASSWORD")
|
|
keyAlias = System.getenv("KEY_ALIAS")
|
|
keyPassword = System.getenv("KEY_PASSWORD")
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
debug {
|
|
isDebuggable = true
|
|
}
|
|
release {
|
|
isDebuggable = false
|
|
isMinifyEnabled = true
|
|
isShrinkResources = true
|
|
signingConfig = signingConfigs.getByName("release")
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro"
|
|
)
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
|
|
buildFeatures {
|
|
compose = true
|
|
buildConfig = true
|
|
}
|
|
|
|
testOptions {
|
|
unitTests.all {
|
|
it.useJUnit()
|
|
}
|
|
}
|
|
|
|
lint {
|
|
abortOnError = true
|
|
checkReleaseBuilds = true
|
|
warningsAsErrors = true
|
|
// These checks describe external release freshness, not source
|
|
// correctness. Keep them visible without making a pinned build start
|
|
// failing merely because a newer SDK, Gradle, or dependency appeared.
|
|
informational += setOf(
|
|
"AndroidGradlePluginVersion",
|
|
"GradleDependency",
|
|
"NewerVersionAvailable",
|
|
"OldTargetApi",
|
|
)
|
|
}
|
|
}
|
|
|
|
kotlin {
|
|
compilerOptions {
|
|
allWarningsAsErrors.set(true)
|
|
}
|
|
}
|
|
|
|
dependencyLocking {
|
|
lockAllConfigurations()
|
|
}
|
|
|
|
dependencies {
|
|
// libsu - root library by topjohnwu (Magisk author)
|
|
implementation("com.github.topjohnwu.libsu:core:6.0.0")
|
|
|
|
// AndroidX core
|
|
implementation("androidx.core:core-ktx:1.15.0")
|
|
|
|
// Lifecycle
|
|
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.8.7")
|
|
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.8.7")
|
|
implementation("androidx.lifecycle:lifecycle-runtime-compose:2.8.7")
|
|
|
|
// Coroutines
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1")
|
|
|
|
// Compose BOM
|
|
val composeBom = platform("androidx.compose:compose-bom:2026.06.00")
|
|
implementation(composeBom)
|
|
implementation("androidx.compose.material3:material3:1.5.0-alpha24")
|
|
implementation("androidx.compose.ui:ui")
|
|
implementation("androidx.compose.ui:ui-tooling-preview")
|
|
debugImplementation("androidx.compose.ui:ui-tooling")
|
|
implementation("androidx.compose.foundation:foundation")
|
|
implementation("androidx.compose.material:material-icons-extended")
|
|
implementation("androidx.activity:activity-compose:1.9.3")
|
|
|
|
// Navigation Compose
|
|
implementation("androidx.navigation:navigation-compose:2.8.5")
|
|
|
|
// Hilt
|
|
implementation("com.google.dagger:hilt-android:2.59.2")
|
|
ksp("com.google.dagger:hilt-android-compiler:2.59.2")
|
|
implementation("androidx.hilt:hilt-navigation-compose:1.2.0")
|
|
|
|
testImplementation("junit:junit:4.13.2")
|
|
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.9.0")
|
|
}
|