This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import com.android.build.gradle.internal.tasks.factory.dependsOn
|
||||
import org.jlleitschuh.gradle.ktlint.reporter.ReporterType
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.android.application)
|
||||
alias(libs.plugins.kotlin.android)
|
||||
alias(libs.plugins.ktlint)
|
||||
alias(libs.plugins.ksp)
|
||||
alias(libs.plugins.hilt)
|
||||
alias(libs.plugins.kotlin.serialization)
|
||||
@@ -12,7 +12,7 @@ plugins {
|
||||
}
|
||||
|
||||
android {
|
||||
val latestVersionName = "0.6.5"
|
||||
val latestVersionName = "0.6.6"
|
||||
namespace = "com.looker.droidify"
|
||||
buildToolsVersion = "35.0.0"
|
||||
compileSdk = 35
|
||||
@@ -20,39 +20,30 @@ android {
|
||||
minSdk = 23
|
||||
targetSdk = 35
|
||||
applicationId = "com.looker.droidify"
|
||||
versionCode = 650
|
||||
versionCode = 660
|
||||
versionName = latestVersionName
|
||||
vectorDrawables.useSupportLibrary = false
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
testInstrumentationRunner = "com.looker.droidify.TestRunner"
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
isCoreLibraryDesugaringEnabled = true
|
||||
}
|
||||
compileOptions.isCoreLibraryDesugaringEnabled = true
|
||||
kotlinOptions.freeCompilerArgs = listOf("-opt-in=kotlin.RequiresOptIn", "-Xcontext-parameters")
|
||||
androidResources.generateLocaleConfig = true
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = "17"
|
||||
freeCompilerArgs = listOf(
|
||||
"-opt-in=kotlin.RequiresOptIn",
|
||||
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
|
||||
"-opt-in=kotlinx.coroutines.FlowPreview",
|
||||
"-Xcontext-receivers"
|
||||
)
|
||||
}
|
||||
|
||||
androidResources {
|
||||
generateLocaleConfig = true
|
||||
}
|
||||
|
||||
sourceSets.forEach { source ->
|
||||
val javaDir = source.java.srcDirs.find { it.name == "java" }
|
||||
source.java {
|
||||
srcDir(File(javaDir?.parentFile, "kotlin"))
|
||||
kotlin {
|
||||
jvmToolchain(17)
|
||||
compilerOptions {
|
||||
languageVersion.set(KotlinVersion.KOTLIN_2_2)
|
||||
apiVersion.set(KotlinVersion.KOTLIN_2_2)
|
||||
jvmTarget.set(JvmTarget.JVM_17)
|
||||
}
|
||||
}
|
||||
|
||||
ksp {
|
||||
arg("room.schemaLocation", "$projectDir/schemas")
|
||||
arg("room.generateKotlin", "true")
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
debug {
|
||||
applicationIdSuffix = ".debug"
|
||||
@@ -64,7 +55,7 @@ android {
|
||||
resValue("string", "application_name", "Droid-ify")
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
"proguard.pro"
|
||||
"proguard.pro",
|
||||
)
|
||||
}
|
||||
create("alpha") {
|
||||
@@ -73,7 +64,7 @@ android {
|
||||
resValue("string", "application_name", "Droid-ify Alpha")
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
"proguard.pro"
|
||||
"proguard.pro",
|
||||
)
|
||||
isDebuggable = true
|
||||
isMinifyEnabled = true
|
||||
@@ -82,7 +73,7 @@ android {
|
||||
buildConfigField(
|
||||
type = "String",
|
||||
name = "VERSION_NAME",
|
||||
value = "\"v$latestVersionName\""
|
||||
value = "\"v$latestVersionName\"",
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -111,18 +102,6 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
ktlint {
|
||||
android.set(true)
|
||||
ignoreFailures.set(true)
|
||||
debug.set(true)
|
||||
reporters {
|
||||
reporter(ReporterType.HTML)
|
||||
}
|
||||
filter {
|
||||
exclude("**/generated/**")
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
coreLibraryDesugaring(libs.desugaring)
|
||||
|
||||
@@ -144,19 +123,17 @@ dependencies {
|
||||
implementation(libs.kotlin.stdlib)
|
||||
implementation(libs.datetime)
|
||||
|
||||
implementation(libs.coroutines.core)
|
||||
implementation(libs.coroutines.android)
|
||||
implementation(libs.coroutines.guava)
|
||||
implementation(libs.bundles.coroutines)
|
||||
|
||||
implementation(libs.libsu.core)
|
||||
implementation(libs.shizuku.api)
|
||||
api(libs.shizuku.provider)
|
||||
implementation(libs.bundles.shizuku)
|
||||
|
||||
implementation(libs.jackson.core)
|
||||
implementation(libs.serialization)
|
||||
|
||||
implementation(libs.ktor.core)
|
||||
implementation(libs.ktor.okhttp)
|
||||
implementation(libs.bundles.ktor)
|
||||
implementation(libs.bundles.room)
|
||||
ksp(libs.room.compiler)
|
||||
|
||||
implementation(libs.work.ktx)
|
||||
|
||||
@@ -169,13 +146,16 @@ dependencies {
|
||||
testImplementation(platform(libs.junit.bom))
|
||||
testImplementation(libs.bundles.test.unit)
|
||||
testRuntimeOnly(libs.junit.platform)
|
||||
androidTestImplementation(platform(libs.junit.bom))
|
||||
androidTestImplementation(libs.hilt.test)
|
||||
androidTestImplementation(libs.room.test)
|
||||
androidTestImplementation(libs.bundles.test.android)
|
||||
kspAndroidTest(libs.hilt.compiler)
|
||||
|
||||
// debugImplementation(libs.leakcanary)
|
||||
}
|
||||
|
||||
// using a task as a preBuild dependency instead of a function that takes some time insures that it runs
|
||||
// in /res are (almost) all languages that have a translated string is saved. this is safer and saves some time
|
||||
task("detectAndroidLocals") {
|
||||
val langsList: MutableSet<String> = HashSet()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user