Skip to content

Commit

Permalink
jvmdg hackery
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysdh540 committed Nov 19, 2024
1 parent 2736a1f commit 0c518c4
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 19 deletions.
1 change: 0 additions & 1 deletion api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ buildConfig {

useJavaOutput()

// the below errors shown by IntelliJ can be safely ignored; Jabel works around this
buildConfigField("MOD_ID", "mod_id"())
buildConfigField("MOD_VERSION", Zume.version)
buildConfigField("MOD_NAME", "mod_name"())
Expand Down
20 changes: 13 additions & 7 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ import kotlin.math.max
plugins {
id("java")
id("maven-publish")
id("com.github.johnrengelman.shadow")
id("me.modmuss50.mod-publish-plugin")
id("com.gradleup.shadow")
id("xyz.wagyourtail.unimined")
id("me.modmuss50.mod-publish-plugin")
id("org.ajoberstar.grgit")
id("ru.vyarus.use-python")
}
Expand Down Expand Up @@ -204,20 +204,26 @@ allprojects {
tasks.withType<JavaCompile> {
if (name !in arrayOf("compileMcLauncherJava", "compilePatchedMcJava")) {
options.encoding = "UTF-8"
sourceCompatibility = "21"
options.release = 8
options.release = 21
javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(21)
}
options.compilerArgs.addAll(arrayOf("-Xplugin:Manifold no-bootstrap", "-Xplugin:jabel"))
options.forkOptions.jvmArgs?.add("-XX:+EnableDynamicAgentLoading")

doFirst {
options.compilerArgs.addAll(
arrayOf(
"-Xplugin:Manifold no-bootstrap", "-Xplugin:jvmdg release=8 ${
project.configurations["compileClasspath"].files.joinToString(" ") { "cp=$it" }
}"))
}
}
}

dependencies {
compileOnly("org.jetbrains:annotations:${"jetbrains_annotations_version"()}")

annotationProcessor("com.pkware.jabel:jabel-javac-plugin:${"jabel_version"()}")
annotationProcessor("dev.rdh:jvmdg-javac:${"jvmdg_javac_version"()}:all")
annotationProcessor(files("buildSrc/build/libs/buildSrc.jar"))

compileOnly("systems.manifold:manifold-rt:${"manifold_version"()}")
annotationProcessor("systems.manifold:manifold-exceptions:${"manifold_version"()}")
Expand Down
3 changes: 2 additions & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@ dependencies {
implementation("org.apache.ant:ant:${"shadow_ant_version"()}")
implementation("com.guardsquare:proguard-base:${"proguard_version"()}")

plugin(id = "com.github.johnrengelman.shadow", version = "shadow_version"())
plugin(id = "com.gradleup.shadow", version = "shadow_version"())
plugin(id = "xyz.wagyourtail.unimined", version = "unimined_version"())
plugin(id = "com.github.gmazzo.buildconfig", version = "buildconfig_version"())
plugin(id = "org.ajoberstar.grgit", version = "grgit_version"())
plugin(id = "me.modmuss50.mod-publish-plugin", version = "mod_publish_version"())
plugin(id = "ru.vyarus.use-python", version = "use_python_version"())
plugin(id = "xyz.wagyourtail.jvmdowngrader", version = "jvmdg_version"())
}
14 changes: 8 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Gradle
org.gradle.jvmargs = -Xmx4G -XX:+EnableDynamicAgentLoading
org.gradle.jvmargs = -Xmx4G
org.gradle.daemon = true
org.gradle.parallel = true
org.gradle.caching = true
Expand Down Expand Up @@ -100,8 +100,8 @@ embeddium_fabric_version = 0.3.26-beta.106+mc1.20.1
embeddium_lexforge_version = 0.3.31-beta.53+mc1.20.1
## https://maven.blamejared.com/org/embeddedt/embeddium-1.21/
embeddium_neoforge_version = 1.0.8-beta.367+mc1.21
# https://central.sonatype.com/artifact/com.pkware.jabel/jabel-javac-plugin
jabel_version = 1.0.1-1
# https://maven.taumc.org/releases/dev/rdh/jvmdg-javac/
jvmdg_javac_version = 0.1
# https://github.com/Nolij/ZSON/releases/latest
zson_version = 0.5.0
# https://github.com/Nolij/LibNolij/releases/latest
Expand All @@ -128,8 +128,8 @@ portablemc_version = 4.4.0
mapping_io_version = 0.3.0
# https://github.com/johnrengelman/shadow/blob/main/gradle/dependencies.gradle
shadow_ant_version = 1.10.4
# https://plugins.gradle.org/plugin/com.github.johnrengelman.shadow
shadow_version = 8.1.1
# https://plugins.gradle.org/plugin/com.gradleup.shadow
shadow_version = 8.3.5
# https://central.sonatype.com/artifact/com.guardsquare/proguard-base
proguard_version = 7.6.0
# https://github.com/unimined/unimined/releases/latest
Expand All @@ -141,4 +141,6 @@ grgit_version = 5.3.0
# https://plugins.gradle.org/plugin/me.modmuss50.mod-publish-plugin
mod_publish_version = 0.7.4
# https://github.com/xvik/gradle-use-python-plugin/releases/latest
use_python_version = 4.1.0
use_python_version = 4.1.0
# https://github.com/unimined/JvmDowngrader/releases/latest
jvmdg_version = 1.2.1
4 changes: 0 additions & 4 deletions stubs/src/main/java/java/lang/Record.java

This file was deleted.

0 comments on commit 0c518c4

Please sign in to comment.