diff --git a/build.gradle b/build.gradle index ca81566..17c9caf 100644 --- a/build.gradle +++ b/build.gradle @@ -69,6 +69,7 @@ propertyDefaultIfUnset("includeMCVersionJar", false) propertyDefaultIfUnset("autoUpdateBuildScript", false) propertyDefaultIfUnset("modArchivesBaseName", project.modId) propertyDefaultIfUnsetWithEnvVar("developmentEnvironmentUserName", "Developer", "DEV_USERNAME") +propertyDefaultIfUnset("additionalJavaArguments", "") propertyDefaultIfUnset("enableJava17RunTasks", false) propertyDefaultIfUnset("generateGradleTokenClass", "") propertyDefaultIfUnset("gradleTokenModId", "") @@ -382,6 +383,10 @@ minecraft { ]) } + if (additionalJavaArguments.size() != 0) { + extraRunJvmArguments.addAll(additionalJavaArguments.split(';')) + } + if (enableJava17RunTasks.toBoolean()) { lwjgl3Version = "3.3.2" } diff --git a/gradle.properties b/gradle.properties index 7c671fb..c9de5d3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -27,6 +27,11 @@ minecraftVersion = 1.12.2 # Alternatively this can be set with the 'DEV_USERNAME' environment variable. developmentEnvironmentUserName = Developer +# Additional arguments applied to the JVM when launching minecraft +# Syntax: -arg1=value1;-arg2=value2;... +# Example value: -Dmixin.debug.verify=true;-XX:+UnlockExperimentalVMOptions +additionalJavaArguments = + # Enables using modern java syntax (up to version 17) via Jabel, while still targeting JVM 8. # See https://github.com/bsideup/jabel for details on how this works. # Using this requires that you use a Java 17 JDK for development.