diff options
Diffstat (limited to 'build-logic/android-plugins/src')
2 files changed, 16 insertions, 0 deletions
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 e56d400b..509cc96d 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 @@ -7,6 +7,7 @@ import flavors.FlavorDimensions import flavors.ProductFlavors import signing.configureBuildSigning +import snapshot.SnapshotExtension plugins { id("com.android.application") @@ -64,3 +65,8 @@ android { project.configureBuildSigning() } + +dependencies { + extensions.add("snapshot", SnapshotExtension::class.java) + the<SnapshotExtension>().snapshot = isSnapshot() +} diff --git a/build-logic/android-plugins/src/main/kotlin/snapshot/SnapshotExtension.kt b/build-logic/android-plugins/src/main/kotlin/snapshot/SnapshotExtension.kt new file mode 100644 index 00000000..80a352a5 --- /dev/null +++ b/build-logic/android-plugins/src/main/kotlin/snapshot/SnapshotExtension.kt @@ -0,0 +1,10 @@ +/* + * Copyright © 2014-2021 The Android Password Store Authors. All Rights Reserved. + * SPDX-License-Identifier: GPL-3.0-only + */ + +package snapshot + +abstract class SnapshotExtension { + abstract var snapshot: Boolean +} |