File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
main/java/org/gradlex/javamodule/moduleinfo
test/groovy/org/gradlex/javamodule/moduleinfo/test Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -175,9 +175,9 @@ public void transform(TransformOutputs outputs) {
175175 private ModuleSpec findModuleSpec (File originalJar ) {
176176 Map <String , ModuleSpec > moduleSpecs = getParameters ().getModuleSpecs ().get ();
177177
178- Optional <String > gaCoordinates = moduleSpecs .keySet ().stream ().filter (ga -> gaCoordinatesFromFilePathMatch (originalJar .toPath (), ga )).findFirst ();
179- if (gaCoordinates .isPresent ()) {
180- String ga = gaCoordinates .get ();
178+ Optional <ModuleSpec > moduleSpec = moduleSpecs .values ().stream ().filter (spec -> gaCoordinatesFromFilePathMatch (originalJar .toPath (), spec . getIdentifier () )).findFirst ();
179+ if (moduleSpec .isPresent ()) {
180+ String ga = moduleSpec .get (). getIdentifier ();
181181 if (moduleSpecs .containsKey (ga )) {
182182 return moduleSpecs .get (ga );
183183 } else {
Original file line number Diff line number Diff line change @@ -43,9 +43,19 @@ class ClassifiedJarsFunctionalTest extends Specification {
4343 implementation("io.netty:netty-transport-native-epoll:0:linux-x86_64")
4444 implementation("io.netty:netty-transport-native-epoll:0:linux-aarch_64")
4545 }
46- extraJavaModuleInfo {
46+ extraJavaModuleInfo {
47+ failOnAutomaticModules.set(true)
4748 module("io.netty:netty-transport-native-epoll|linux-x86_64", "io.netty.transport.epoll.linux.x86_64")
4849 module("io.netty:netty-transport-native-epoll|linux-aarch_64", "io.netty.transport.epoll.linux.aarch_64")
50+
51+ module("io.netty:netty-transport-native-unix-common", "io.netty.transport.unix.common")
52+ module("io.netty:netty-buffer", "io.netty.buffer")
53+ module("io.netty:netty-codec", "io.netty.codec")
54+ module("io.netty:netty-common", "io.netty.common")
55+ module("io.netty:netty-handler", "io.netty.handler")
56+ module("io.netty:netty-resolver", "io.netty.resolver")
57+ module("io.netty:netty-transport", "io.netty.transport")
58+ module("io.netty:netty-transport-classes-epoll", "io.netty.transport.classes.epoll")
4959 }
5060 """
5161
You can’t perform that action at this time.
0 commit comments