diff options
author | Harsh Shandilya <me@msfjarvis.dev> | 2021-11-29 02:27:21 +0530 |
---|---|---|
committer | Harsh Shandilya <me@msfjarvis.dev> | 2021-12-03 12:59:57 +0530 |
commit | 120dc5fca46f41886f7ecdd84332b519b5bc5584 (patch) | |
tree | b17b5d9dab3b08048e1bccb0356ca17f8a332465 | |
parent | 4d327646a4f508920b653fac112914473ec25954 (diff) |
all: switch to new convention plugins
-rw-r--r-- | app/build.gradle.kts | 25 | ||||
-rw-r--r-- | autofill-parser/build.gradle.kts | 8 | ||||
-rw-r--r-- | build.gradle.kts | 4 | ||||
-rw-r--r-- | openpgp-ktx/build.gradle.kts | 6 |
4 files changed, 24 insertions, 19 deletions
diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 6220d4f7..855f1189 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -5,14 +5,12 @@ import com.android.build.gradle.internal.api.BaseVariantOutputImpl plugins { - id("com.android.application") - kotlin("android") - kotlin("kapt") + id("com.github.android-password-store.android-application") + id("com.github.android-password-store.crowdin-plugin") + id("com.github.android-password-store.kotlin-android") + id("com.github.android-password-store.kotlin-kapt") + id("com.github.android-password-store.versioning-plugin") id("dagger.hilt.android.plugin") - id("com.github.android-password-store.kotlin-common") - `versioning-plugin` - `aps-plugin` - `crowdin-plugin` } repositories { @@ -31,7 +29,18 @@ repositories { } } -configure<CrowdinExtension> { projectName = "android-password-store" } +configure<crowdin.CrowdinExtension> { + projectName = "android-password-store" + skipCleanup = false +} + +fun isSnapshot(): Boolean { + with(project.providers) { + val workflow = environmentVariable("GITHUB_WORKFLOW").forUseAtConfigurationTime() + val snapshot = environmentVariable("SNAPSHOT").forUseAtConfigurationTime() + return workflow.isPresent || snapshot.isPresent + } +} android { if (isSnapshot()) { diff --git a/autofill-parser/build.gradle.kts b/autofill-parser/build.gradle.kts index 0aabd881..fea86ce6 100644 --- a/autofill-parser/build.gradle.kts +++ b/autofill-parser/build.gradle.kts @@ -4,13 +4,11 @@ */ plugins { - id("com.android.library") + id("com.github.android-password-store.android-library") + id("com.github.android-password-store.kotlin-android") id("com.vanniktech.maven.publish") - kotlin("android") id("org.jetbrains.dokka") - id("com.github.android-password-store.kotlin-common") - `aps-plugin` - `psl-plugin` + id("com.github.android-password-store.psl-plugin") } android { diff --git a/build.gradle.kts b/build.gradle.kts index 38c846cb..7b375b6b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,9 +3,9 @@ * SPDX-License-Identifier: GPL-3.0-only */ plugins { + id("com.github.android-password-store.kotlin-common") id("com.github.android-password-store.binary-compatibility") - id("com.github.android-password-store.gradle") id("com.github.android-password-store.git-hooks") - id("com.github.android-password-store.kotlin-common") + id("com.github.android-password-store.gradle") id("com.github.android-password-store.spotless") } diff --git a/openpgp-ktx/build.gradle.kts b/openpgp-ktx/build.gradle.kts index e0e4bf64..b2c25c94 100644 --- a/openpgp-ktx/build.gradle.kts +++ b/openpgp-ktx/build.gradle.kts @@ -4,12 +4,10 @@ */ plugins { - id("com.android.library") + id("com.github.android-password-store.android-library") + id("com.github.android-password-store.kotlin-android") id("com.vanniktech.maven.publish") - kotlin("android") id("org.jetbrains.dokka") - id("com.github.android-password-store.kotlin-common") - `aps-plugin` } android { |