mirror of
https://github.com/runelite/plugin-hub.git
synced 2026-04-04 15:03:37 -04:00
package: allow modular java 8 projects
even if you compile with --release 8, javac will still emit a module-info.class with it's version set to 53 (java 9) if you have a module-info.java
This commit is contained in:
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@@ -29,7 +29,7 @@ jobs:
|
||||
path: |
|
||||
~/.gradle/caches/
|
||||
~/.gradle/wrapper/
|
||||
key: package-2.0.8
|
||||
key: package-2.0.9
|
||||
- name: prepare
|
||||
run: |
|
||||
pushd package
|
||||
@@ -82,7 +82,7 @@ jobs:
|
||||
path: |
|
||||
~/.gradle/caches/
|
||||
~/.gradle/wrapper/
|
||||
key: upload-2.0.8
|
||||
key: upload-2.0.9
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: manifest_diff
|
||||
|
||||
@@ -536,7 +536,7 @@ public class Plugin implements Closeable
|
||||
@Override
|
||||
public void visit(int version, int access, String name, String signature, String superName, String[] interfaces)
|
||||
{
|
||||
if (version > Opcodes.V1_8 && !fileName.startsWith("META-INF/versions"))
|
||||
if (version > Opcodes.V1_8 && !(fileName.startsWith("META-INF/versions") || fileName.endsWith("module-info.class")))
|
||||
{
|
||||
throw PluginBuildException.of(Plugin.this, "plugins must be Java 1.8 compatible")
|
||||
.withFile(fileName);
|
||||
|
||||
Reference in New Issue
Block a user