-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
67 lines (57 loc) · 1.55 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
plugins {
`java-library`
`maven-publish`
idea
id("com.github.johnrengelman.shadow") version "8.1.1"
}
repositories {
mavenLocal()
maven("https://repo.maven.apache.org/maven2/")
maven("https://jitpack.io")
maven("https://repo.opencollab.dev/maven-releases/")
maven("https://repo.opencollab.dev/maven-snapshots/")
}
group = "cn.powernukkitx"
version = "1.0.0-SNAPSHOT"
description = "powernukkitx example plugin"
java.sourceCompatibility = JavaVersion.VERSION_21
dependencies {
//Check it out https://jitpack.io/#PowerNukkitX/PowerNukkitX
compileOnly("com.github.PowerNukkitX:PowerNukkitX:master-SNAPSHOT")
//local dependency
//compileOnly(files("D:\\IdeaProjects\\PowerNukkitX\\build\\powernukkitx-2.0.0-SNAPSHOT-all.jar"))
}
//Automatically download dependencies source code
idea {
module {
isDownloadSources = true
isDownloadJavadoc = false
}
}
java {
withSourcesJar()
}
tasks.build {
dependsOn(tasks.shadowJar)
}
sourceSets {
main {
resources {
srcDirs("src/main/resources")
}
}
}
tasks.compileJava {
options.encoding = "UTF-8"
options.compilerArgs.add("-Xpkginfo:always")
java.sourceCompatibility = JavaVersion.VERSION_21
java.targetCompatibility = JavaVersion.VERSION_21
}
tasks.test {
useJUnitPlatform()
jvmArgs(listOf("--add-opens", "java.base/java.lang=ALL-UNNAMED"))
jvmArgs(listOf("--add-opens", "java.base/java.io=ALL-UNNAMED"))
}
tasks.withType<AbstractCopyTask>() {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}