-
Notifications
You must be signed in to change notification settings - Fork 397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integration with maven-publish hard to use #611
Comments
Possibly relates to https://youtrack.jetbrains.com/issue/IDEA-163411 and also seems like a reprisal of #264 |
Was just looking at this again and saw this in changelog.
Could you reply with a quick snippet on how I'd use that configuration? |
Ah, this actually works: |
Please check the User Guide before submitting "how do I do 'x'?" questions!
Shadow Version
6.1.0
Gradle Version
6.7
Expected Behavior
This issue is filed per this comment.
Given a multi-module project, where A depends on B, and where B uses this shadow plugin to bundle some external dependencies (in this case, antlr),
Actual Behavior
It seems that 1 might already be fine, but I have only published to maven-local as a proof of concept so far. The issue I'm having is with 2. I have several "unresolved references" in IDEA that were previously resolvable. These references are to classes that were relocated in B. In the past, I simply built the B jar and included it directly in A (with
implementation(files("libs/antlr-$internalAntlrVersion.jar"))
andjar.from(zipTree("libs/antlr-$internalAntlrVersion.jar"))
), and my IDE had no trouble with this. Now I'm usingimplementation(project(path = ":antlr", configuration = "shadow"))
and several relocated classes are red in the IDE.My best guess right now is that IDEA doesn't really understand
configuration = "shadow"
, but without that project A depended on the unrelocated jar and compilation from the command line failed.Gradle Build Script(s)
You can find the code at https://github.com/autonomousapps/dependency-analysis-android-gradle-plugin/tree/pub-antlr. (the pub-antlr branch). The most relevant files are:
Content of Shadow JAR (
jar tf <jar file>
- post link to GIST if too long)https://gist.github.com/autonomousapps/fc5aff10403b5a07f34391fcfd88945d
Additional context
Project A is the root project and publishes a gradle plugin. Project B is a normal Java/Kotlin project that uses antlr to create and publish a custom grammar.
The text was updated successfully, but these errors were encountered: