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 {
|
||||
repositories {
|
||||
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 {
|
||||
if (path == ":app" || path == ":storage:lib") {
|
||||
if (path != ":storage:demo") {
|
||||
apply(plugin = "org.jlleitschuh.gradle.ktlint")
|
||||
|
||||
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.
|
||||
|
||||
# Kotlin versions
|
||||
# https://android.googlesource.com/platform/external/kotlinc/+/refs/tags/android-14.0.0_r1/build.txt
|
||||
aosp-kotlin = { strictly = "1.8.10" }
|
||||
|
||||
# Lint versions
|
||||
|
|
|
@ -1,5 +1,14 @@
|
|||
[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"
|
||||
|
||||
androidGradle = "8.1.2"
|
||||
protobuf = "0.9.4"
|
||||
ktlint = "11.5.0"
|
||||
|
|
|
@ -72,6 +72,7 @@ dependencies {
|
|||
|
||||
androidTestImplementation(libs.kotlin.stdlib.jdk8)
|
||||
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()}")
|
||||
}
|
||||
|
|
|
@ -46,11 +46,14 @@ android {
|
|||
freeCompilerArgs += listOf("-opt-in=kotlin.RequiresOptIn")
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
disable("DialogFragmentCallbacksDetector", "InvalidFragmentVersionForActivityResult")
|
||||
lint {
|
||||
disable += setOf(
|
||||
"DialogFragmentCallbacksDetector",
|
||||
"InvalidFragmentVersionForActivityResult"
|
||||
)
|
||||
}
|
||||
|
||||
packagingOptions {
|
||||
packaging {
|
||||
jniLibs {
|
||||
excludes += listOf("META-INF/services/kotlin*")
|
||||
}
|
||||
|
|
|
@ -18,9 +18,8 @@ android {
|
|||
|
||||
defaultConfig {
|
||||
minSdk = libs.versions.minSdk.get().toInt()
|
||||
targetSdk = libs.versions.targetSdk.get().toInt()
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
testInstrumentationRunnerArguments(mapOf("disableAnalytics" to "true"))
|
||||
testInstrumentationRunnerArguments["disableAnalytics"] = "true"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
|
|
Loading…
Reference in a new issue