-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle.kts
110 lines (95 loc) · 2.68 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
import io.franzbecker.gradle.lombok.task.DelombokTask
import org.checkerframework.gradle.plugin.CheckerFrameworkExtension
plugins {
id("java")
id("org.checkerframework") version "0.6.13"
id("io.franzbecker.gradle-lombok") version "5.0.0"
`maven-publish`
signing
}
group = "moe.nea"
version = "1.6.0"
repositories {
mavenCentral()
}
dependencies {
compileOnly("org.jetbrains:annotations:24.0.0")
implementation("com.google.code.gson:gson:2.9.0")
testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
lombok {
version = "1.18.32"
sha256 = "97574674e2a25f567a313736ace00df8787d443de316407d57fc877d9f19a65d"
}
java {
withJavadocJar()
}
configure<CheckerFrameworkExtension> {
}
val delombok by tasks.registering(DelombokTask::class) {
mainClass.set(lombok.main)
dependsOn(tasks.compileJava)
val outputDir by extra { layout.buildDirectory.dir("delombok").get() }
outputs.dir(outputDir)
sourceSets["main"].java.srcDirs.forEach {
inputs.dir(it)
args(it, "-d", outputDir)
}
doFirst {
delete(outputDir)
}
}
tasks.javadoc {
dependsOn(delombok)
val outputDir: Directory by delombok.get().extra
source = outputDir.asFileTree
}
val sourcesJar by tasks.creating(Jar::class) {
dependsOn(delombok)
from(delombok)
archiveClassifier.set("sources")
}
tasks.withType<JavaCompile>() {
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
}
tasks.getByName<Test>("test") {
useJUnitPlatform()
}
tasks.processResources {
filesMatching("neurepoparser.properties") {
expand(
"VERSION" to version
)
}
}
publishing {
publications {
create<MavenPublication>("maven") {
from(components["java"])
artifact(sourcesJar) {
classifier = "sources"
}
pom {
name.set("NEU Repo Parsing")
description.set("A library for standardized parsing of the NotEnoughUpdates item repository")
url.set("https://github.com/NotEnoughUpdates/RepoParser")
licenses {
license {
name.set("BSD 2-Clause")
url.set("https://github.com/NotEnoughUpdates/RepoParser/blob/master/LICENSE")
}
}
developers {
developer {
name.set("Linnea Gräf")
}
}
scm {
url.set("https://github.com/NotEnoughUpdates/RepoParser")
}
}
}
}
}