diff options
author | Harsh Shandilya <me@msfjarvis.dev> | 2021-12-26 11:59:57 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-26 06:29:57 +0000 |
commit | 674a7d299bbe10692902d35fd2bbeef9ebe7a9f5 (patch) | |
tree | f2b01d88bc8845b1f27c7f012a6254b3e965e55c /build-logic | |
parent | 43f6a0090f4f89464348eae98bf7303fa59bd13a (diff) |
Misc cleanups to build-logic and expand BCV exclusion list (#1622)
* build-logic: remove `kotlin-dsl-precompiled-script-plugins` plugin
* build-logic: use generated accessors for extensions
* build: exclude non-published library projects from API dump
There's no point in tracking binary compatibility for libraries that are only used internally
Diffstat (limited to 'build-logic')
7 files changed, 18 insertions, 25 deletions
diff --git a/build-logic/android-plugins/build.gradle.kts b/build-logic/android-plugins/build.gradle.kts index 8c4315dd..cdc7c315 100644 --- a/build-logic/android-plugins/build.gradle.kts +++ b/build-logic/android-plugins/build.gradle.kts @@ -8,10 +8,7 @@ import org.gradle.api.tasks.compile.JavaCompile import org.gradle.kotlin.dsl.withType import org.jetbrains.kotlin.gradle.tasks.KotlinCompile -plugins { - `kotlin-dsl` - `kotlin-dsl-precompiled-script-plugins` -} +plugins { `kotlin-dsl` } afterEvaluate { tasks.withType<JavaCompile>().configureEach { diff --git a/build-logic/android-plugins/src/main/kotlin/com.github.android-password-store.android-application.gradle.kts b/build-logic/android-plugins/src/main/kotlin/com.github.android-password-store.android-application.gradle.kts index e223b721..955ddaaa 100644 --- a/build-logic/android-plugins/src/main/kotlin/com.github.android-password-store.android-application.gradle.kts +++ b/build-logic/android-plugins/src/main/kotlin/com.github.android-password-store.android-application.gradle.kts @@ -3,10 +3,8 @@ * SPDX-License-Identifier: GPL-3.0-only */ -import com.android.build.gradle.internal.dsl.BaseAppModuleExtension import flavors.FlavorDimensions import flavors.ProductFlavors -import org.gradle.kotlin.dsl.configure import signing.configureBuildSigning plugins { @@ -22,7 +20,7 @@ fun Project.isSnapshot(): Boolean { } } -extensions.configure<BaseAppModuleExtension> { +android { val minifySwitch = project.providers.environmentVariable("DISABLE_MINIFY").forUseAtConfigurationTime() diff --git a/build-logic/android-plugins/src/main/kotlin/com.github.android-password-store.published-android-library.gradle.kts b/build-logic/android-plugins/src/main/kotlin/com.github.android-password-store.published-android-library.gradle.kts index 85ebdbe3..3aa55b7a 100644 --- a/build-logic/android-plugins/src/main/kotlin/com.github.android-password-store.published-android-library.gradle.kts +++ b/build-logic/android-plugins/src/main/kotlin/com.github.android-password-store.published-android-library.gradle.kts @@ -3,9 +3,7 @@ * SPDX-License-Identifier: GPL-3.0-only */ -import org.gradle.kotlin.dsl.configure import org.gradle.kotlin.dsl.provideDelegate -import org.gradle.plugins.signing.SigningExtension plugins { id("com.github.android-password-store.android-library") @@ -14,7 +12,7 @@ plugins { } afterEvaluate { - extensions.configure<SigningExtension> { + signing { val signingKey: String? by project val signingPassword: String? by project useInMemoryPgpKeys(signingKey, signingPassword) diff --git a/build-logic/automation-plugins/build.gradle.kts b/build-logic/automation-plugins/build.gradle.kts index 15c5baa9..8ec63671 100644 --- a/build-logic/automation-plugins/build.gradle.kts +++ b/build-logic/automation-plugins/build.gradle.kts @@ -8,10 +8,7 @@ import org.gradle.api.tasks.compile.JavaCompile import org.gradle.kotlin.dsl.withType import org.jetbrains.kotlin.gradle.tasks.KotlinCompile -plugins { - `kotlin-dsl` - `kotlin-dsl-precompiled-script-plugins` -} +plugins { `kotlin-dsl` } afterEvaluate { tasks.withType<JavaCompile>().configureEach { diff --git a/build-logic/kotlin-plugins/build.gradle.kts b/build-logic/kotlin-plugins/build.gradle.kts index 229c5f17..8e182d12 100644 --- a/build-logic/kotlin-plugins/build.gradle.kts +++ b/build-logic/kotlin-plugins/build.gradle.kts @@ -8,10 +8,7 @@ import org.gradle.api.tasks.compile.JavaCompile import org.gradle.kotlin.dsl.withType import org.jetbrains.kotlin.gradle.tasks.KotlinCompile -plugins { - `kotlin-dsl` - `kotlin-dsl-precompiled-script-plugins` -} +plugins { `kotlin-dsl` } afterEvaluate { tasks.withType<JavaCompile>().configureEach { diff --git a/build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.binary-compatibility.gradle.kts b/build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.binary-compatibility.gradle.kts index 053a69ab..4e0ceaa3 100644 --- a/build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.binary-compatibility.gradle.kts +++ b/build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.binary-compatibility.gradle.kts @@ -3,9 +3,17 @@ * SPDX-License-Identifier: GPL-3.0-only */ -import kotlinx.validation.ApiValidationExtension -import org.gradle.kotlin.dsl.configure - plugins { id("org.jetbrains.kotlinx.binary-compatibility-validator") } -extensions.configure<ApiValidationExtension> { ignoredProjects = mutableSetOf("app") } +apiValidation { + ignoredProjects = + mutableSetOf( + "app", + "coroutine-utils", + "coroutine-utils-testing", + "crypto-common", + "crypto-pgpainless", + "format-common", + "diceware", + ) +} diff --git a/build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.kotlin-kapt.gradle.kts b/build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.kotlin-kapt.gradle.kts index 36642ba4..14542655 100644 --- a/build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.kotlin-kapt.gradle.kts +++ b/build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.kotlin-kapt.gradle.kts @@ -4,8 +4,6 @@ */ import org.gradle.api.Project -import org.gradle.kotlin.dsl.configure -import org.jetbrains.kotlin.gradle.plugin.KaptExtension plugins { kotlin("android") @@ -13,7 +11,7 @@ plugins { } afterEvaluate { - extensions.configure<KaptExtension> { + kapt { javacOptions { if (hasDaggerCompilerDependency()) { // https://dagger.dev/dev-guide/compiler-options#fastinit-mode |