-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
101 lines (89 loc) · 2.62 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
plugins {
`maven-publish`
signing
kotlin("jvm")
}
description = "Kotlin extensions to convert GeoJSON to JTS and vice-versa"
group = "io.jawg.geojson"
version = "${property("version")}"
val isReleaseVersion = !version.toString().endsWith("SNAPSHOT")
tasks {
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
test {
useJUnitPlatform()
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
withJavadocJar()
withSourcesJar()
}
javadoc {
if (JavaVersion.current().isJava9Compatible) {
(options as StandardJavadocDocletOptions).addBooleanOption("html5", true)
}
}
}
publishing {
repositories {
maven {
val releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2"
val snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots"
url = uri(if (isReleaseVersion) releasesRepoUrl else snapshotsRepoUrl)
credentials {
val ossrhUsername: String? by project
val ossrhPassword: String? by project
username = ossrhUsername
password = ossrhPassword
}
}
}
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
pom {
name.set("Kotlin extensions to convert GeoJSON to JTS and vice-versa")
description.set("Kotlin extensions to convert GeoJSON to JTS and vice-versa")
url.set("https://github.com/jawg/geojson-jackson-jts-extensions")
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
organization {
name.set("Jawg")
url.set("https://jawg.io")
}
developers {
developer {
id.set("jawg")
name.set("Jawg")
email.set("[email protected]")
}
}
scm {
connection.set("scm:git:git://[email protected]:jawg/geojson-jackson-jts-extensions.git")
developerConnection.set("scm:git:ssh://[email protected]:jawg/geojson-jackson-jts-extensions.git")
url.set("https://github.com/jawg/geojson-jackson-jts-extensions")
}
}
}
}
}
signing {
sign(publishing.publications["mavenJava"])
}
tasks.withType<Sign>().configureEach {
onlyIf { isReleaseVersion }
}
dependencies {
api("io.jawg.geojson:geojson-jackson:${property("version.jawg.geojson-jackson")}")
api("org.locationtech.jts:jts-core:${property("version.jts")}")
testImplementation(kotlin("test-junit5"))
}