-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
85 lines (70 loc) · 2.25 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
74
75
76
77
78
79
80
81
82
83
84
85
plugins {
`java-library`
groovy
`maven-publish`
signing
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
}
repositories {
mavenCentral()
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
withSourcesJar()
withJavadocJar()
}
dependencies {
compileOnly("com.google.code.findbugs:jsr305:3.0.2")
testImplementation("org.spockframework:spock-core:1.3-groovy-2.5")
}
publishing {
publications {
create("mavenJava", MavenPublication::class) {
from(components["java"])
pom {
val githubRepo = providers.gradleProperty("githubRepo")
val githubUrl = githubRepo.map { "https://github.com/$it" }
name.set(providers.gradleProperty("projectName"))
description.set(providers.gradleProperty("projectDescription"))
url.set(providers.gradleProperty("projectUrl"))
licenses {
license {
name.set(providers.gradleProperty("projectLicenseName"))
url.set(providers.gradleProperty("projectLicenseUrl"))
}
}
developers {
developer {
name.set(providers.gradleProperty("developerName"))
email.set(providers.gradleProperty("developerEmail"))
url.set(providers.gradleProperty("developerUrl"))
}
}
scm {
url.set(githubUrl.map { "$it/tree/master" })
connection.set(githubRepo.map { "scm:git:git://github.com/$it.git" })
developerConnection.set(githubRepo.map { "scm:git:ssh://github.com:$it.git" })
}
issueManagement {
url.set(githubUrl.map { "$it/issues" })
system.set("GitHub")
}
}
}
}
repositories {
maven {
name = "local"
url = uri("$buildDir/repos/releases")
}
}
}
signing {
sign(publishing.publications["mavenJava"])
}
nexusPublishing {
repositories {
sonatype()
}
}