Launch Minecraft Client with JMCCC in Gradle PLugin.
Our plugin supports both Kotlin DSL and Groovy DSL, while the example code was written in Kotlin DSL.
jmccc {
runs {
// Add a new version to run
create("Forge 1.12.2") {
// The version which will be used
version {
// Minecraft version
minecraft.set("1.12.2")
// Forge version
forge.set("14.23.5.2860")
}
// Special the run dir
workingDirectory.set(project.file("run"))
// Copy mod file to mods dir automatically
modFiles.add(tasks["jar"])
// Special the Java version as Java 8
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
}
}
}
}
This project is using Java 8 to compile.
export JAVA_HOME=(/usr/libexec/java_home -v 1.8)
export GRADLE_PUBLISH_KEY=
export GRADLE_PUBLISH_SECRET=
./gradlew preMerge --continue
./gradlew --project-dir plugin-build setupPluginUploadFromEnvironment publishPlugins