@@ -20,10 +20,31 @@ dokka {
2020 path = kotlin. sourceSets. commonMain. kotlin. srcDirs[0 ]
2121 platforms = [" Common" ]
2222 }
23+ // if (kotlin.sourceSets.getNames().contains("jvmMain")) {
24+ // sourceRoot {
25+ // // assuming there is only a single source dir...
26+ // path = kotlin.sourceSets.jvmMain.kotlin.srcDirs[0]
27+ // platforms = ["JVM"]
28+ // }
29+ // }
30+ // if (kotlin.sourceSets.getNames().contains("jsMain")) {
31+ // sourceRoot {
32+ // // assuming there is only a single source dir...
33+ // path = kotlin.sourceSets.jsMain.kotlin.srcDirs[0]
34+ // platforms = ["js"]
35+ // }
36+ // }
37+ // if (kotlin.sourceSets.getNames().contains("nativeMain")) {
38+ // sourceRoot {
39+ // // assuming there is only a single source dir...
40+ // path = kotlin.sourceSets.nativeMain.kotlin.srcDirs[0]
41+ // platforms = ["native"]
42+ // }
43+ // }
2344}
2445
2546def isReleaseBuild () {
26- return VERSION_NAME . contains(" SNAPSHOT" ) == false
47+ return version . contains(" SNAPSHOT" ) == false
2748}
2849
2950def getReleaseRepositoryUrl () {
@@ -37,11 +58,11 @@ def getSnapshotRepositoryUrl() {
3758}
3859
3960def getRepositoryUsername () {
40- return hasProperty (' SONATYPE_NEXUS_USERNAME' ) ? SONATYPE_NEXUS_USERNAME : " "
61+ return findProperty (' SONATYPE_NEXUS_USERNAME' ) ?: System . getenv( ' SONATYPE_NEXUS_USERNAME' ) ? : " "
4162}
4263
4364def getRepositoryPassword () {
44- return hasProperty (' SONATYPE_NEXUS_PASSWORD' ) ? SONATYPE_NEXUS_PASSWORD : " "
65+ return findProperty (' SONATYPE_NEXUS_PASSWORD' ) ?: System . getenv( ' SONATYPE_NEXUS_PASSWORD' ) ? : " "
4566}
4667
4768task emptySourcesJar (type : Jar ) {
@@ -54,8 +75,11 @@ task javadocsJar(type: Jar, dependsOn: dokka) {
5475}
5576
5677signing {
57- required { isReleaseBuild() && gradle. taskGraph. hasTask(" uploadArchives" ) }
58- sign(publishing. publications)
78+ required { isReleaseBuild() /* && gradle.taskGraph.hasTask("uploadArchives") */ }
79+ // def signingKey = findProperty("GPG_SECRET") ?: System.getenv('GPG_SECRET') ?: ""
80+ // def signingPassword = findProperty("GPG_SIGNING_PASSWORD") ?: System.getenv('GPG_SIGNING_PASSWORD') ?: ""
81+ // useInMemoryPgpKeys(signingKey, signingPassword)
82+ // sign(publishing.publications)
5983}
6084
6185publishing {
0 commit comments