Skip to content

Commit e8e13ad

Browse files
author
Abduqodiri Qurbonzoda
authored
Configure signing of publishing projects regardless of sonatype (#12)
It is needed when plugin publishing is configured using infra. The plugin might be published only to Gradle Plugin Portal.
1 parent 4b57e9b commit e8e13ad

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

main/src/kotlinx/team/infra/Publishing.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,16 @@ internal fun Project.configurePublishing(publishing: PublishingConfiguration) {
9191
if (verifySonatypeConfiguration()) {
9292
includeProjects.forEach { subproject ->
9393
subproject.createSonatypeRepository()
94-
subproject.configureSigning()
9594
}
9695
}
9796
}
9897

98+
if (project.hasProperty("teamcity")) {
99+
includeProjects.forEach { subproject ->
100+
subproject.configureSigning()
101+
}
102+
}
103+
99104
gradle.includedBuilds.forEach { includedBuild ->
100105
logger.infra("Included build: ${includedBuild.name} from ${includedBuild.projectDir}")
101106
val includedPublishTask = includedBuild.task(":$compositeBuildLocal")

publish.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
project.version = project.hasProperty('releaseVersion') ? project.property('releaseVersion') : project.version
22

33
task sourceJar(type: Jar) {
4-
classifier 'sources'
4+
archiveClassifier.set("sources")
55
from sourceSets.main.allJava.sourceDirectories
66
}
77

0 commit comments

Comments
 (0)