-
Notifications
You must be signed in to change notification settings - Fork 33
/
build.gradle.kts
66 lines (52 loc) · 1.5 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
plugins {
java
`java-library`
`maven-publish`
id("com.github.harbby.gradle.serviceloader") version ("1.1.8")
id("io.github.goooler.shadow") version ("8.1.8")
}
subprojects {
plugins.apply("java")
plugins.apply("java-library")
plugins.apply("maven-publish")
plugins.apply("com.github.harbby.gradle.serviceloader")
plugins.apply("io.github.goooler.shadow")
group = "net.minestom.vanilla"
version = "indev"
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
// withJavadocJar()
withSourcesJar()
sourceSets.main {
java.srcDir("src/main/java")
}
}
tasks.withType<Jar> {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
tasks.withType<Wrapper> {
gradleVersion = rootProject.gradle.gradleVersion
}
repositories {
mavenCentral()
maven(url = "https://jitpack.io")
mavenLocal()
}
dependencies {
}
publishing {
publications {
register("maven", MavenPublication::class) {
from(components["java"])
}
}
}
serviceLoader.serviceInterfaces.add("net.minestom.vanilla.VanillaReimplementation\$Feature")
serviceLoader.serviceInterfaces.add("org.slf4j.spi.SLF4JServiceProvider")
tasks.getByName("build").dependsOn("shadowJar")
tasks.withType<Test> {
dependsOn("serviceLoaderBuild")
useJUnitPlatform()
}
}