-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
59 lines (50 loc) · 1.41 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
plugins {
`java-library`
`maven-publish`
id("com.gradleup.shadow") version "8.3.5"
}
java.toolchain.languageVersion.set(JavaLanguageVersion.of(21))
tasks.shadowJar { archiveClassifier.set("final"); mergeServiceFiles() }
repositories {
mavenCentral()
}
dependencies {
api("org.openrewrite:rewrite-java-21:8.40.3")
api("org.cadixdev:at:0.1.0-rc1")
implementation("org.apache.logging.log4j:log4j-core:3.0.0-beta3")
implementation("org.slf4j:slf4j-api:2.0.16")
testImplementation("org.junit.jupiter:junit-jupiter:5.11.3")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
tasks.test {
useJUnitPlatform {
if (System.getenv()["CI"]?.toBoolean() != true) excludeTags.add("function")
}
}
tasks.jar {
manifest {
attributes("Implementation-Version" to project.version)
}
}
publishing {
repositories {
val url = if (project.version.toString().endsWith("-SNAPSHOT")) {
"https://repo.papermc.io/repository/maven-snapshots/"
} else {
"https://repo.papermc.io/repository/maven-releases/"
}
maven(url) {
credentials(PasswordCredentials::class)
name = "paper"
}
}
publications.create<MavenPublication>("maven") {
artifactId = "restamp"
from(components["java"])
}
}
tasks.register("printVersion") {
doFirst {
println(version)
}
}