Repository navigation
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
81 lines (68 loc) · 1.82 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
81 lines (68 loc) · 1.82 KB
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
import com.vanniktech.maven.publish.JavaLibrary
import com.vanniktech.maven.publish.JavadocJar
plugins {
id("java-library")
id("java")
id("com.vanniktech.maven.publish") version "0.37.0"
}
repositories {
mavenCentral()
}
group = "io.github.adr"
var version: String = project.findProperty("projVersion")?.toString() ?: "2.0.0"
if (project.findProperty("tagbuild")?.toString() != "true") {
version += "-SNAPSHOT"
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
vendor = JvmVendorSpec.ADOPTIUM
}
}
tasks.withType<JavaCompile>().configureEach {
options.release = 17
}
dependencies {
testImplementation("org.junit.jupiter:junit-jupiter:6.1.0")
testImplementation("org.junit.platform:junit-platform-launcher:6.0.3")
}
tasks.test {
useJUnitPlatform()
}
mavenPublishing {
coordinates("io.github.adr", "e-adr", version)
publishToMavenCentral()
signAllPublications()
pom {
name.set("e-adr")
description.set("Architectural Decision Records embedded in Java code")
inceptionYear.set("2017")
url.set("https://github.com/adr/e-addr/")
licenses {
license {
name.set("EPL-2.0")
}
}
developers {
developer {
id.set("koppor")
name.set("Oliver Kopp")
url.set("https://github.com/koppor/")
}
}
scm {
url.set("https://github.com/adr/e-adr")
connection.set("scm:git:https://github.com/adr/e-adr.git")
developerConnection.set("scm:git:github.com:adr/e-adr.git")
}
}
}
/*
// Include the BOM in the generated POM ("inline" / "inlining")
// Source: https://github.com/gradle/gradle/issues/10861#issuecomment-3027387345
publishing.publications.withType<MavenPublication>().configureEach {
versionMapping {
allVariants { fromResolutionResult() }
}
}
*/