diff options
author | Linnea Gräf <nea@nea.moe> | 2023-11-23 13:27:12 +0100 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2023-11-23 13:27:12 +0100 |
commit | db56cfdb57c481de8c833a1a53b7e9f9cdae82c0 (patch) | |
tree | fe74dd40f2b8f74e9e5d71d684372dcd1ab2600b /alwaysUseGpg.init.gradle.kts | |
download | gradle-init-scripts-db56cfdb57c481de8c833a1a53b7e9f9cdae82c0.tar.gz gradle-init-scripts-db56cfdb57c481de8c833a1a53b7e9f9cdae82c0.tar.bz2 gradle-init-scripts-db56cfdb57c481de8c833a1a53b7e9f9cdae82c0.zip |
Initial commit
Diffstat (limited to 'alwaysUseGpg.init.gradle.kts')
-rw-r--r-- | alwaysUseGpg.init.gradle.kts | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/alwaysUseGpg.init.gradle.kts b/alwaysUseGpg.init.gradle.kts new file mode 100644 index 0000000..8a4250b --- /dev/null +++ b/alwaysUseGpg.init.gradle.kts @@ -0,0 +1,20 @@ +/** + * Configures gradles signing plugin to use the gpg command instead of gradle properties for keys. + * Requires you to set global gradle properties like so: + * ``` + * signing.gnupg.executable=gpg + * signing.gnupg.useLegacyGpg=true + * signing.gnupg.keyName=AA563E93EB628D91 + * ``` + * + * You can get the keyname by running `gpg --list-secret-keys --keyid-format long`. The id you want here is a signing key (it will have a `S` inside of the `[S]` brackets.). Usually you will want to sign with a subkey (indicated by `ssb` at the beginning of the line). + */ + + +allprojects { + afterEvaluate { + extensions.findByType<SigningExtension>()?.run { + useGpgCmd() + } + } +} |