-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.gradle.kts
73 lines (66 loc) · 2.08 KB
/
build.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
plugins {
java
`maven-publish`
signing
id("io.github.gradle-nexus.publish-plugin")
id("biz.aQute.bnd.builder") version "7.1.0"
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
}
withJavadocJar()
withSourcesJar()
}
nexusPublishing {
repositories {
sonatype {
// https://central.sonatype.org/news/20210223_new-users-on-s01/
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
}
}
}
publishing {
publications.create<MavenPublication>("mavenJava") {
artifactId = project.name
from(components["java"])
pom {
name.set("Develocity Testing Annotations")
description.set("Common annotations for Develocity Testing.")
url.set("https://github.com/gradle/develocity-testing-annotations/")
licenses {
license {
name.set("Apache-2.0")
url.set("https://www.apache.org/licenses/LICENSE-2.0")
}
}
developers {
developer {
name.set("The Gradle team")
organization.set("Gradle Inc.")
organizationUrl.set("https://gradle.com")
}
}
scm {
connection.set("scm:git:git://github.com/gradle/develocity-testing-annotations.git")
developerConnection.set("scm:git:ssh://[email protected]:gradle/develocity-testing-annotations.git")
url.set("https://github.com/gradle/develocity-testing-annotations/")
}
}
}
}
signing {
sign(publishing.publications["mavenJava"])
useInMemoryPgpKeys(System.getenv("PGP_SIGNING_KEY"), System.getenv("PGP_SIGNING_KEY_PASSPHRASE"))
}
tasks.jar {
bundle.bnd(
"-exportcontents: *"
)
}
tasks.withType<Jar>().configureEach {
into(".") {
from(rootProject.layout.projectDirectory.file("LICENSE"))
}
}