Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,21 @@ tasks.withType(JavaCompile).configureEach {
options.release.set(11)
}

tasks.register('run', JavaExec) {
classpath = sourceSets.test.runtimeClasspath
mainClass = 'com.choiceman.ChoiceManPluginTest'

jvmArgs "-ea"
// RuneLite targets Java 11. On a newer JDK its macOS full-screen adapter
// touches the internal com.apple.eawt API, which later JDKs no longer export
// to unnamed modules, so the client crashes on startup with IllegalAccessError.
// The official launcher opens these up; the bare run task must do the same.
if (org.gradle.internal.os.OperatingSystem.current().isMacOsX()) {
jvmArgs "--add-exports", "java.desktop/com.apple.eawt=ALL-UNNAMED"
}
args "--developer-mode", "--debug"
}

tasks.register('shadowJar', Jar) {
dependsOn configurations.testRuntimeClasspath
manifest {
Expand Down