-
Notifications
You must be signed in to change notification settings - Fork 36
/
build.gradle.kts
102 lines (88 loc) · 3.22 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
102
/*
* Copyright (c) 2021. JetBrains s.r.o.
* Use of this source code is governed by the MIT license that can be found in the LICENSE file.
*/
plugins {
kotlin("jvm")
`maven-publish`
signing
}
val geoToolsVersion = extra["geotools.version"] as String
dependencies {
implementation(projects.plotApi)
compileOnly("org.geotools:gt-main:$geoToolsVersion")
compileOnly("org.geotools:gt-geojson:$geoToolsVersion")
testImplementation(kotlin("test"))
testImplementation("org.geotools:gt-main:$geoToolsVersion")
testImplementation("org.geotools:gt-geojson:$geoToolsVersion")
}
val artifactBaseName = "lets-plot-kotlin-geotools"
val artifactGroupId = project.group as String
val artifactVersion = project.version as String
val jarClasses by tasks.creating(Jar::class) {
group = "lets plot"
from(sourceSets.main.get().output)
}
val jarSources by tasks.creating(Jar::class) {
archiveClassifier.set("sources")
group = "lets plot"
from(sourceSets.main.get().allSource)
}
val jarJavaDocs by tasks.creating(Jar::class) {
archiveClassifier.set("javadoc")
group = "lets plot"
from("$rootDir/README.md")
}
afterEvaluate {
publishing {
publications {
// Build artifact with no dependencies in POM.
create<MavenPublication>("letsPlotKotlinGeoTools") {
groupId = artifactGroupId
artifactId = artifactBaseName
version = artifactVersion
// This leads to 'maven-publish' failure: "Publishing is not able to resolve a dependency
// on a project with multiple publications that have different coordinates."
// from(components["java"])
artifact(jarClasses)
artifact(jarSources)
artifact(jarJavaDocs)
pom {
name.set("Lets-Plot Kotlin GeoTools Bridge")
description.set(
"Lets-Plot Kotlin GeoTools Bridge." +
"\nRequires GeoTools artifacts:" +
"\n - org.geotools:gt-main:$geoToolsVersion" +
"\n - org.geotools:gt-geojson:$geoToolsVersion"
)
url.set("https://github.com/JetBrains/lets-plot-kotlin")
licenses {
license {
name.set("MIT")
url.set("https://raw.githubusercontent.com/JetBrains/lets-plot-kotlin/master/LICENSE")
}
}
developers {
developer {
id.set("jetbrains")
name.set("JetBrains")
email.set("lets-plot@jetbrains.com")
}
}
scm {
url.set("https://github.com/JetBrains/lets-plot-kotlin")
}
}
}
}
repositories {
mavenLocal {
val localMavenRepository: String by project
url = uri(localMavenRepository)
}
}
}
}
signing {
sign(publishing.publications)
}