-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
110 lines (92 loc) · 2.82 KB
/
build.gradle
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
plugins {
id 'java'
id 'maven-publish'
id 'org.jetbrains.gradle.plugin.idea-ext' version '1.1.7'
}
group 'com.cleanroommc'
version '0.10'
archivesBaseName = 'bouncepad'
java {
toolchain {
vendor = JvmVendorSpec.AZUL
languageVersion.set(JavaLanguageVersion.of(21))
}
}
def compilerArgs = [
'--add-exports=java.base/jdk.internal.access=ALL-UNNAMED',
'--add-exports=java.base/jdk.internal.loader=ALL-UNNAMED',
]
repositories {
mavenCentral()
maven {
name 'Minecraft'
url 'https://libraries.minecraft.net/'
}
maven {
name 'CleanroomMC'
url 'https://maven.cleanroommc.com'
}
}
configurations {
embed
implementation.extendsFrom(embed)
}
dependencies {
implementation 'zone.rong:imaginebreaker:2.1'
implementation 'org.apache.logging.log4j:log4j-api:2.22.0'
implementation 'org.apache.logging.log4j:log4j-core:2.22.0'
annotationProcessor 'org.apache.logging.log4j:log4j-core:2.22.0'
implementation 'org.jline:jline:3.25.1'
implementation 'org.jline:jline-terminal-jansi:3.25.1'
implementation ('net.minecrell:terminalconsoleappender:1.3.0') {
transitive = false
}
implementation 'org.ow2.asm:asm:9.6'
implementation 'org.ow2.asm:asm-commons:9.6'
implementation 'org.ow2.asm:asm-tree:9.6'
implementation 'net.sf.jopt-simple:jopt-simple:5.0.4'
testCompileOnly project(':test')
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testImplementation 'org.openjdk.jmh:jmh-core:1.36'
testImplementation 'org.openjdk.jol:jol-core:0.17'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
testAnnotationProcessor 'org.openjdk.jmh:jmh-generator-annprocess:1.36'
}
processResources {
from (configurations.embed.collect { it.isDirectory() ? it : zipTree(it) }) {
exclude 'META-INF/**'
}
}
test {
dependsOn ':test:build'
useJUnitPlatform()
}
tasks.withType(JavaCompile).configureEach {
options.encoding 'UTF-8'
options.compilerArgs.addAll(compilerArgs)
}
tasks.register('bounce', JavaExec) {
classpath = sourceSets.main.runtimeClasspath
jvmArgs '-Djava.system.class.loader=com.cleanroommc.bouncepad.BouncepadClassLoader'
systemProperty 'bouncepad.doNotProcessArguments', 'true'
mainClass = 'com.cleanroommc.bouncepad.Bouncepad'
}
idea.project.settings.compiler.javac.javacAdditionalOptions = compilerArgs.join(' ')
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifactId = 'bouncepad'
}
}
repositories {
maven {
name = 'CleanroomMaven'
url = CleanroomMaven
credentials(PasswordCredentials)
authentication {
basic(BasicAuthentication)
}
}
}
}