forked from MCreator/Generator-Forge-1.12.2
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.gradle
More file actions
50 lines (37 loc) · 1.31 KB
/
build.gradle
File metadata and controls
50 lines (37 loc) · 1.31 KB
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
plugins {
id "java"
}
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
tasks.named('processResources') {
filesMatching('plugin.json') {
expand(
version: project.version,
mcreatorVersionShort: project.mcreatorVersionShort,
pluginVersion: project.pluginVersion
)
}
}
tasks.jar {
archiveFileName.set("generator-${version}-${pluginVersion}-${mcreatorVersionShort}.zip")
}
tasks.register('runMCreatorWithPlugin', JavaExec) {
dependsOn(processResources, jar)
environment("MCREATOR_PLUGINS_FOLDER", file("./build/libs"))
jvmArgs '--add-opens', 'java.base/java.lang=ALL-UNNAMED'
classpath = project(':MCreator').sourceSets.main.runtimeClasspath
mainClass = 'net.mcreator.Launcher'
workingDir = mcreator_path
}
subprojects { subproject ->
subproject.plugins.withType(JavaPlugin) {
test {
useJUnitPlatform()
include '**/GeneratorsTest.class'
dependsOn rootProject.processResources
dependsOn rootProject.jar
environment("MCREATOR_PLUGINS_FOLDER", new File(rootProject.projectDir, "/build/libs"))
environment("MCREATOR_TEST_GENERATORS", "forge-${version}, resourcepack-${version}")
workingDir = mcreator_path
}
}
}