@@ -10,7 +10,20 @@ plugins {
1010 alias(libs.plugins.intellij.ide)
1111}
1212
13- val props by localProperties()
13+ val pluginPrivateKey by lazy {
14+ val props by localProperties()
15+ props[" plugin.publishing.privatekey" ]?.toString()?.trim()?.takeIf { it.isNotBlank() }
16+ }
17+
18+ val pluginSigningPassword by lazy {
19+ val props by localProperties()
20+ props[" signing.password" ]?.toString()?.trim()?.takeIf { it.isNotBlank() }
21+ }
22+
23+ val pluginPublishingToken by lazy {
24+ val props by localProperties()
25+ props[" plugin.publishing.token" ]?.toString()?.trim()?.takeIf { it.isNotBlank() }
26+ }
1427
1528repositories {
1629 google {
@@ -30,13 +43,15 @@ intellijPlatform {
3043 projectName = Config .name
3144 // needed when plugin provides custom settings exposed to the UI
3245 buildSearchableOptions = false
33- signing {
34- certificateChainFile = rootProject.rootDir.resolve(Config .Plugin .certPath)
35- privateKey = props[" plugin.publishing.privatekey" ]?.toString()
36- password = props[" signing.password" ]?.toString()
46+ if (pluginPrivateKey != null && pluginSigningPassword != null ) {
47+ signing {
48+ certificateChainFile = rootProject.rootDir.resolve(Config .Plugin .certPath)
49+ privateKey = pluginPrivateKey
50+ password = pluginSigningPassword
51+ }
3752 }
3853 publishing {
39- token = props[ " plugin.publishing.token " ]?.toString()
54+ token = pluginPublishingToken
4055 hidden = true
4156 }
4257 pluginVerification {
0 commit comments