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:
Max Weber
2021-10-16 00:31:00 -06:00
parent b2d09b0d9f
commit 98669a69a6
2 changed files with 3 additions and 3 deletions

View File

@@ -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

View File

@@ -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);