Last active
June 20, 2019 00:40
-
-
Save garyttierney/8ad76ed31eaa7a542c28f91fa75e282d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| From 4b0fc1de4fee7bd95b511fd291d654659279b559 Mon Sep 17 00:00:00 2001 | |
| From: Gary Tierney <[email protected]> | |
| Date: Thu, 20 Jun 2019 01:34:45 +0100 | |
| Subject: [PATCH] Fix multi-project Gradle artifact resolution | |
| Updates the check for resolved artifacts to include directories of | |
| classes as well as JAR files. This supports the case where a resolved | |
| artifact contains the build output of a Gradle project within the same | |
| project tree. | |
| Signed-off-by: Gary Tierney <[email protected]> | |
| --- | |
| .../main/java/io/quarkus/gradle/AppModelGradleResolver.java | 6 ++++-- | |
| 1 file changed, 4 insertions(+), 2 deletions(-) | |
| diff --git a/devtools/gradle/src/main/java/io/quarkus/gradle/AppModelGradleResolver.java b/devtools/gradle/src/main/java/io/quarkus/gradle/AppModelGradleResolver.java | |
| index ee1314e77..7f8dc0d1e 100644 | |
| --- a/devtools/gradle/src/main/java/io/quarkus/gradle/AppModelGradleResolver.java | |
| +++ b/devtools/gradle/src/main/java/io/quarkus/gradle/AppModelGradleResolver.java | |
| @@ -88,13 +88,15 @@ public class AppModelGradleResolver implements AppModelResolver { | |
| final List<AppDependency> userDeps = new ArrayList<>(); | |
| Map<ModuleIdentifier, ModuleVersionIdentifier> userModules = new HashMap<>(); | |
| for (ResolvedArtifact a : compileCp.getResolvedConfiguration().getResolvedArtifacts()) { | |
| - if (!"jar".equals(a.getExtension())) { | |
| + final File f = a.getFile(); | |
| + | |
| + if (!"jar".equals(a.getExtension()) && !f.isDirectory()) { | |
| continue; | |
| } | |
| + | |
| userModules.put(getModuleId(a), a.getModuleVersion().getId()); | |
| userDeps.add(toAppDependency(a)); | |
| - final File f = a.getFile(); | |
| final Dependency dep; | |
| if (f.isDirectory()) { | |
| dep = processQuarkusDir(a, f.toPath().resolve(BootstrapConstants.META_INF)); | |
| -- | |
| 2.20.1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment