-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
89 lines (70 loc) · 2.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
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
id("com.github.johnrengelman.shadow") version("7.1.2") apply(false)
id("java")
id("io.papermc.paperweight.userdev") version("1.5.4") apply(false)
}
dependencies {
implementation(project(":main"))
implementation(project(":v1_19_R1", "reobf"))
}
allprojects {
apply(plugin = "java")
apply(plugin = "com.github.johnrengelman.shadow")
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
}
repositories {
mavenCentral()
}
group = "org.minerift.ether"
version = "1.0-SNAPSHOT"
tasks.withType<ShadowJar> {
archiveClassifier.set("") // SUPER IMPORTANT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
dependencies {
include(project(":main"))
include(project(":v1_19_R1"))
include(dependency("xyz.jpenilla:reflection-remapper"))
}
}
}
// Paper-API dependency for submodules
subprojects {
repositories {
mavenCentral()
maven { url = uri("https://repo.papermc.io/repository/maven-public/") }
}
dependencies {
compileOnly("io.papermc.paper:paper-api:1.19.2-R0.1-SNAPSHOT")
}
}
// Once more versions are implemented, this list will grow
configure(subprojects.filter { listOf("v1_19_R1").contains(it.name) }) {
apply(plugin = "io.papermc.paperweight.userdev")
repositories {
mavenCentral()
}
dependencies {
implementation(project(":main"))
implementation("xyz.jpenilla:reflection-remapper:0.1.1")
}
}
/*
compileJava.options.encoding = 'UTF-8'
tasks.withType<Test> {
//systemProperties = System.getProperties()
systemProperties.remove("java.endorsed.dirs")
}
tasks.create("runBinaryTests", Test::class) {
dependsOn("shadowJar")
val FAT_JAR_FILEPATH = "$projectDir/build/libs/${project.name}-$version-all.jar"
testClassesDirs += zipTree(FAT_JAR_FILEPATH)
classpath = project.files(FAT_JAR_FILEPATH, configurations.runtimeClasspath)
outputs.upToDateWhen { false }
}
task runBinaryTests(type: Test) {
testClassesDirs += zipTree($projectDir/fatjar.jar)
classpath = project.files( "$projectDir/fatjar.jar", configurations.runtime )
outputs.upToDateWhen { false }
}
*/