Skip to content

Commit

Permalink
Simplify AddOpens by including them in the manifest file (#144)
Browse files Browse the repository at this point in the history
* Simplify AddOpens by including them in the manifest file

* Add 2 new add opens to fix issues with gson.toJson as listed below:
Failed making field 'java.lang.ref.Reference#referent' accessible
Failed making field 'java.util.concurrent.locks.ReentrantLock#sync' accessible
  • Loading branch information
spacebuilder2020 authored May 12, 2024
1 parent 561d5fd commit a2baf36
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import org.apache.tools.ant.filters.ReplaceTokens
import java.time.OffsetDateTime
import java.time.ZoneOffset
import java.time.format.DateTimeFormatter
import kotlin.streams.toList

plugins {
id("com.gtnewhorizons.gtnhconvention")
Expand All @@ -23,6 +24,8 @@ val addOpens = listOf(
"java.base/java.nio=ALL-UNNAMED",
"java.base/java.io=ALL-UNNAMED",
"java.base/java.lang=ALL-UNNAMED",
"java.base/java.lang.ref=ALL-UNNAMED",
"java.base/java.util.concurrent.locks=ALL-UNNAMED",
"java.base/java.lang.reflect=ALL-UNNAMED",
"java.base/java.text=ALL-UNNAMED",
"java.base/java.util=ALL-UNNAMED",
Expand Down Expand Up @@ -147,6 +150,7 @@ val forgePatchesJar = tasks.register<Jar>("forgePatchesJar") {
attributes(
mapOf(
"Class-Path" to libraryList.joinToString(" "),
"Add-Opens" to addOpens.stream().map{ it.split("=")[0]}.toList().joinToString(" "),
"Main-Class" to "me.eigenraven.lwjgl3ify.rfb.entry.ServerMain"
)
)
Expand Down

0 comments on commit a2baf36

Please sign in to comment.