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 /app/build.gradle.kts | |
parent | 4d327646a4f508920b653fac112914473ec25954 (diff) |
all: switch to new convention plugins
Diffstat (limited to 'app/build.gradle.kts')
-rw-r--r-- | app/build.gradle.kts | 25 |
1 files changed, 17 insertions, 8 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()) { |