-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
113 lines (99 loc) · 3.26 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
103
104
105
106
107
108
109
110
111
112
113
plugins {
id("java-library")
id("jacoco-report-aggregation")
id("maven-publish")
id("signing")
id("com.palantir.git-version") version "3.1.0"
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
}
group = "io.github.twonirwana"
val gitVersion: groovy.lang.Closure<String> by extra
version = gitVersion()
description = "Dice expression parser and evaluator"
repositories {
mavenCentral()
}
dependencies {
compileOnly("org.projectlombok:lombok:1.18.36")
annotationProcessor("org.projectlombok:lombok:1.18.36")
implementation("com.google.guava:guava:33.4.0-jre")
implementation("org.apache.commons:commons-lang3:3.17.0")
testCompileOnly("org.projectlombok:lombok:1.18.36")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.11.4")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.11.4")
testImplementation("org.junit.jupiter:junit-jupiter-params:5.11.4")
testImplementation("org.assertj:assertj-core:3.27.2")
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
withJavadocJar()
withSourcesJar()
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
}
tasks.getByName<Test>("test") {
useJUnitPlatform()
}
tasks.jacocoTestReport {
reports {
xml.required.set(true)
html.required.set(false)
}
}
publishing {
println("Version: " + gitVersion())
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/twonirwana/DiceEvaluator")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
publications {
create<MavenPublication>("mavenJava") {
artifactId = "dice-evaluator"
from(components["java"])
pom {
name.set("dice-evaluator")
description.set("Dice infix notation (aka calculator notation) expression parser and evaluator")
url.set("https://github.com/twonirwana/DiceEvaluator")
version = gitVersion()
licenses {
license {
name.set("GNU Affero General Public License v3.0")
url.set("https://www.gnu.org/licenses/agpl-3.0.en.html")
}
}
developers {
developer {
id.set("2nirwana")
name.set("Janno von Stülpnagel")
email.set("jvs@mailbox.org")
}
}
scm {
connection.set("scm:git:git://github.com/twonirwana/DiceEvaluator.git")
developerConnection.set("scm:git:ssh://github.com/twonirwana/DiceEvaluator.git")
url.set("https://github.com/twonirwana/DiceEvaluator")
}
}
}
}
}
signing {
sign(publishing.publications["mavenJava"])
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
}
}
}