Skip to content

Commit

Permalink
Clean up Gradle build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
stevesoltys committed Oct 18, 2023
1 parent a3b6d58 commit ba50b88
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 16 deletions.
11 changes: 1 addition & 10 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
}
}

Expand All @@ -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> {
Expand Down
1 change: 1 addition & 0 deletions build.libs.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions build.plugins.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[versions]
# 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"
Expand Down
3 changes: 2 additions & 1 deletion contactsbackup/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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()}")
}
9 changes: 6 additions & 3 deletions storage/demo/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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*")
}
Expand Down
3 changes: 1 addition & 2 deletions storage/lib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit ba50b88

Please sign in to comment.