aboutsummaryrefslogtreecommitdiff
path: root/alwaysUseGpg.init.gradle.kts
blob: 8a4250b131e082ce029df9745b2eef26a17a5590 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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()
        }
    }
}