Skip to content

Commit

Permalink
Shade updated MVEL2 for JAS
Browse files Browse the repository at this point in the history
Closes #38 - for real this time
  • Loading branch information
eigenraven committed Jun 30, 2024
1 parent 5b22a60 commit 311d177
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import com.gtnewhorizons.retrofuturagradle.minecraft.RunMinecraftTask
import com.gtnewhorizons.retrofuturagradle.util.Distribution
import com.modrinth.minotaur.ModrinthExtension
import org.apache.tools.ant.filters.ReplaceTokens
import java.nio.charset.StandardCharsets
import java.time.OffsetDateTime
import java.time.ZoneOffset
import java.time.format.DateTimeFormatter
Expand Down Expand Up @@ -138,8 +139,14 @@ val forgePatchesJar = tasks.register<Jar>("forgePatchesJar") {
filesMatching("META-INF/*") {
this.name = "${dep.name}-${this.name}"
}
filesMatching("META-INF/services/javax.script.ScriptEngineFactory") {
this.exclude()
}
}
}
from(resources.text.fromString("org.openjdk.nashorn.api.scripting.NashornScriptEngineFactory\norg.mvel2.jsr223.MvelScriptEngineFactory").asFile(StandardCharsets.UTF_8.name())) {
rename { return@rename "META-INF/services/javax.script.ScriptEngineFactory" }
}
exclude("module-info.class")
exclude("META-INF/versions/9/module-info.class")
exclude("log4j2.xml")
Expand Down
2 changes: 2 additions & 0 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ dependencies {
forgePatchesEmbedded("org.apache.commons:commons-lang3:3.14.0")
forgePatchesEmbedded("org.apache.commons:commons-compress:1.26.2")
forgePatchesEmbedded("commons-io:commons-io:2.15.1")
// For Just Another Spawner
forgePatchesEmbedded("org.mvel:mvel2:2.5.2.Final")

compileOnly("org.jetbrains:annotations:24.1.0")

Expand Down

0 comments on commit 311d177

Please sign in to comment.