File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
main/src/kotlinx/team/infra Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -116,13 +116,10 @@ internal fun Project.configurePublishing(publishing: PublishingConfiguration) {
116
116
subproject.configurePublications(publishing)
117
117
}
118
118
119
- createVersionPrepareTask()
119
+ createVersionPrepareTask(publishing )
120
120
121
121
if (publishing.sonatype.isSelected) {
122
122
if (verifySonatypeConfiguration()) {
123
- if (ext.get(" infra.release" ) != true ) {
124
- throw KotlinInfrastructureException (" Cannot publish development version to Sonatype." )
125
- }
126
123
includeProjects.forEach { subproject ->
127
124
subproject.createSonatypeRepository()
128
125
subproject.configureSigning()
@@ -254,9 +251,15 @@ private fun BintrayConfiguration.api(section: String): String {
254
251
return " https://api.bintray.com/$section /$organization /$repository /$library "
255
252
}
256
253
257
- private fun Project.createVersionPrepareTask (): TaskProvider <DefaultTask > {
254
+ private fun Project.createVersionPrepareTask (publishing : PublishingConfiguration ): TaskProvider <DefaultTask > {
258
255
return task<DefaultTask >(" publishPrepareVersion" ) {
259
256
group = PublishingPlugin .PUBLISH_TASK_GROUP
257
+ doFirst {
258
+ val ext = extensions.getByType(ExtraPropertiesExtension ::class .java)
259
+ if (publishing.sonatype.isSelected && ext.get(" infra.release" ) != true ) {
260
+ throw KotlinInfrastructureException (" Cannot publish development version to Sonatype." )
261
+ }
262
+ }
260
263
}
261
264
}
262
265
You can’t perform that action at this time.
0 commit comments