diff --git a/gradle-plugin/src/main/kotlin/xyz/wagyourtail/jvmdg/gradle/flags/DowngradeFlags.kt b/gradle-plugin/src/main/kotlin/xyz/wagyourtail/jvmdg/gradle/flags/DowngradeFlags.kt index a51cf0ee..36309c23 100644 --- a/gradle-plugin/src/main/kotlin/xyz/wagyourtail/jvmdg/gradle/flags/DowngradeFlags.kt +++ b/gradle-plugin/src/main/kotlin/xyz/wagyourtail/jvmdg/gradle/flags/DowngradeFlags.kt @@ -97,7 +97,7 @@ interface DowngradeFlags : TransformParameters { fun DowngradeFlags.toFlags(): Flags { val flags = Flags() - flags.api = apiJar.orNull?.toSet() + flags.api = apiJar.orNull flags.quiet = quiet.getOrElse(false) flags.logAnsiColors = logAnsiColors.getOrElse(true) flags.logLevel = Logger.Level.valueOf(logLevel.getOrElse("INFO").uppercase()) diff --git a/src/main/java/xyz/wagyourtail/jvmdg/cli/Flags.java b/src/main/java/xyz/wagyourtail/jvmdg/cli/Flags.java index 1fd514c9..b5d271f4 100644 --- a/src/main/java/xyz/wagyourtail/jvmdg/cli/Flags.java +++ b/src/main/java/xyz/wagyourtail/jvmdg/cli/Flags.java @@ -21,6 +21,7 @@ import java.security.MessageDigest; import java.util.Collections; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Set; import java.util.TreeMap; @@ -36,7 +37,7 @@ public class Flags { /** * sets the api jar to use, if null will attempt to automatically find it */ - public Set api = null; + public List api = null; /** * sets the log level to {@link Logger.Level#FATAL} diff --git a/src/main/java/xyz/wagyourtail/jvmdg/cli/Main.java b/src/main/java/xyz/wagyourtail/jvmdg/cli/Main.java index 16e64262..362ae1c3 100644 --- a/src/main/java/xyz/wagyourtail/jvmdg/cli/Main.java +++ b/src/main/java/xyz/wagyourtail/jvmdg/cli/Main.java @@ -97,7 +97,7 @@ public static void main(String[] args) throws IOException, ClassNotFoundExceptio } break; case "--api": - Set api = new HashSet<>(); + List api = new ArrayList<>(); for (String[] s : entry.getValue()) { for (String string : s) { String[] split = string.split(File.pathSeparator); diff --git a/src/test/java/xyz/wagyourtail/jvmdg/test/integration/ClassRunner.java b/src/test/java/xyz/wagyourtail/jvmdg/test/integration/ClassRunner.java index 2477b43f..0222dafb 100644 --- a/src/test/java/xyz/wagyourtail/jvmdg/test/integration/ClassRunner.java +++ b/src/test/java/xyz/wagyourtail/jvmdg/test/integration/ClassRunner.java @@ -69,7 +69,7 @@ private static Stream> zip(Stream a, Stream b) { private static Stream flags() { Flags flags = ClassRunner.flags.copy(); flags.quiet = true; - flags.api = Set.of(javaApi.toFile()); + flags.api = List.of(javaApi.toFile()); return Stream.of( new FlagsAndRunner(flags.copy(e -> e.classVersion = JavaRunner.JavaVersion.V1_8.toOpcode()), JavaRunner.JavaVersion.V1_8)