-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodule.publication.gradle.kts
57 lines (52 loc) · 2.05 KB
/
module.publication.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import org.gradle.api.publish.maven.MavenPublication
import org.gradle.api.tasks.bundling.Jar
import org.gradle.kotlin.dsl.`maven-publish`
plugins {
`maven-publish`
signing
}
publishing {
// Configure all publications
publications.withType<MavenPublication> {
// disabled https://github.com/vanniktech/gradle-maven-publish-plugin/issues/754
// and configured at library build.gradle.kts using `JavadocJar.Dokka("dokkaHtml")`.
/*
// Stub javadoc.jar artifact
artifact(tasks.register("${name}JavadocJar", Jar::class) {
archiveClassifier.set("javadoc")
archiveAppendix.set([email protected])
})*/
// Provide artifacts information required by Maven Central
pom {
name.set("Kotlin Multiplatform library for Nexus Portal Publisher API")
description.set("Stub library to test deployment to Maven Central (suited for Sonatype Nexus Portal Publisher API)")
url.set("https://github.com/atsushieno/multiplatform-library-template-nexus-publisher")
licenses {
license {
name.set("MIT")
url.set("https://opensource.org/licenses/MIT")
}
}
developers {
developer {
id.set("atsushieno")
name.set("Atsushi Eno")
organization.set("atsushieno")
organizationUrl.set("https://atsushieno.github.io")
}
}
scm {
url.set("https://github.com/atsushieno/multiplatform-library-template-nexus-publisher")
}
}
}
}
signing {
if (project.hasProperty("mavenCentralUsername") ||
System.getenv("ORG_GRADLE_PROJECT_mavenCentralUsername") != null) {
useGpgCmd()
// It is not perfect (fails at some dependency assertions), better handled as
// `signAllPublications()` (as in vanniktech maven publish plugin) at build.gradle.kts.
//sign(publishing.publications)
}
}