Skip to content

Commit e32a4a9

Browse files
committed
Modify publishPlugin config slightly to allow publishing normal builds
This new config is easier to set up on a developer machine for pushing normal builds out.
1 parent 4393794 commit e32a4a9

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

build.gradle.kts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ val ideaVersionName: String by project
3636
val coreVersion: String by project
3737
val downloadIdeaSources: String by project
3838

39-
// for publishing nightlies
40-
val repoToken: String by project
41-
val repoChannel: String by project
42-
4339
// configurations
4440
val idea by configurations
4541
val gradleToolingExtension: Configuration by configurations.creating {
@@ -126,12 +122,14 @@ intellij {
126122
}
127123

128124
tasks.publishPlugin {
129-
if (properties["publish"] != null) {
130-
project.version = "${project.version}-${properties["buildNumber"]}"
131-
132-
token(repoToken)
133-
channels(repoChannel)
125+
// Build numbers are used for
126+
properties["buildNumber"]?.let { buildNumber ->
127+
project.version = "${project.version}-$buildNumber"
128+
}
129+
properties["mcdev.deploy.token"]?.let { deployToken ->
130+
token(deployToken)
134131
}
132+
channels(properties["mcdev.deploy.channel"] ?: "Stable")
135133
}
136134

137135
java {

0 commit comments

Comments
 (0)