Clean up Gradle build scripts
This commit is contained in:
parent
b917293bbc
commit
b131aaf898
6 changed files with 20 additions and 16 deletions
|
@ -3,15 +3,6 @@ import org.jlleitschuh.gradle.ktlint.KtlintExtension
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
jcenter()
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
classpath("com.android.tools.build:gradle:${plugins.versions.androidGradle}")
|
|
||||||
classpath("com.google.protobuf:protobuf-gradle-plugin:${plugins.versions.protobuf}")
|
|
||||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${plugins.versions.kotlin}")
|
|
||||||
classpath("org.jetbrains.dokka:dokka-gradle-plugin:${plugins.versions.kotlin}")
|
|
||||||
classpath("org.jlleitschuh.gradle:ktlint-gradle:${plugins.versions.ktlint}")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,7 +21,7 @@ tasks.register("clean", Delete::class) {
|
||||||
}
|
}
|
||||||
|
|
||||||
subprojects {
|
subprojects {
|
||||||
if (path == ":app" || path == ":storage:lib") {
|
if (path != ":storage:demo") {
|
||||||
apply(plugin = "org.jlleitschuh.gradle.ktlint")
|
apply(plugin = "org.jlleitschuh.gradle.ktlint")
|
||||||
|
|
||||||
configure<KtlintExtension> {
|
configure<KtlintExtension> {
|
||||||
|
|
|
@ -17,6 +17,7 @@ espresso = "3.4.0"
|
||||||
# We need to enforce that the versions we use are the same as AOSP to ensure compatibility.
|
# We need to enforce that the versions we use are the same as AOSP to ensure compatibility.
|
||||||
|
|
||||||
# Kotlin versions
|
# Kotlin versions
|
||||||
|
# https://android.googlesource.com/platform/external/kotlinc/+/refs/tags/android-14.0.0_r1/build.txt
|
||||||
aosp-kotlin = { strictly = "1.8.10" }
|
aosp-kotlin = { strictly = "1.8.10" }
|
||||||
|
|
||||||
# Lint versions
|
# Lint versions
|
||||||
|
|
|
@ -1,5 +1,14 @@
|
||||||
[versions]
|
[versions]
|
||||||
|
# We need to enforce that the versions we use are the same as AOSP to ensure compatibility.
|
||||||
|
# 1.3.61 Android 11
|
||||||
|
# 1.4.30 Android 12
|
||||||
|
# 1.6.10 Android 13
|
||||||
|
# 1.7.20 Android 13 (QPR2)
|
||||||
|
# 1.8.10 Android 14
|
||||||
|
# Check:
|
||||||
|
# https://android.googlesource.com/platform/external/kotlinc/+/refs/tags/android-14.0.0_r1/build.txt
|
||||||
kotlin = "1.8.10"
|
kotlin = "1.8.10"
|
||||||
|
|
||||||
androidGradle = "8.1.2"
|
androidGradle = "8.1.2"
|
||||||
protobuf = "0.9.4"
|
protobuf = "0.9.4"
|
||||||
ktlint = "11.5.0"
|
ktlint = "11.5.0"
|
||||||
|
|
|
@ -72,6 +72,7 @@ dependencies {
|
||||||
|
|
||||||
androidTestImplementation(libs.kotlin.stdlib.jdk8)
|
androidTestImplementation(libs.kotlin.stdlib.jdk8)
|
||||||
androidTestImplementation("androidx.test.ext:junit:1.1.5")
|
androidTestImplementation("androidx.test.ext:junit:1.1.5")
|
||||||
androidTestImplementation("androidx.test.espresso:espresso-core:${libs.versions.espresso.get()}")
|
androidTestImplementation(
|
||||||
|
"androidx.test.espresso:espresso-core:${libs.versions.espresso.get()}")
|
||||||
androidTestImplementation("io.mockk:mockk-android:${libs.versions.mockk.get()}")
|
androidTestImplementation("io.mockk:mockk-android:${libs.versions.mockk.get()}")
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,11 +46,14 @@ android {
|
||||||
freeCompilerArgs += listOf("-opt-in=kotlin.RequiresOptIn")
|
freeCompilerArgs += listOf("-opt-in=kotlin.RequiresOptIn")
|
||||||
}
|
}
|
||||||
|
|
||||||
lintOptions {
|
lint {
|
||||||
disable("DialogFragmentCallbacksDetector", "InvalidFragmentVersionForActivityResult")
|
disable += setOf(
|
||||||
|
"DialogFragmentCallbacksDetector",
|
||||||
|
"InvalidFragmentVersionForActivityResult"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
packagingOptions {
|
packaging {
|
||||||
jniLibs {
|
jniLibs {
|
||||||
excludes += listOf("META-INF/services/kotlin*")
|
excludes += listOf("META-INF/services/kotlin*")
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,9 +18,8 @@ android {
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdk = libs.versions.minSdk.get().toInt()
|
minSdk = libs.versions.minSdk.get().toInt()
|
||||||
targetSdk = libs.versions.targetSdk.get().toInt()
|
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
testInstrumentationRunnerArguments(mapOf("disableAnalytics" to "true"))
|
testInstrumentationRunnerArguments["disableAnalytics"] = "true"
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
|
Loading…
Reference in a new issue