Skip to content
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

add dependencies from grease configuration to compileOnly #13

Merged
merged 2 commits into from
Oct 8, 2024

Conversation

0xera
Copy link
Collaborator

@0xera 0xera commented Sep 23, 2024

No description provided.

@natario1
Copy link
Member

Were you able to reproduce #11? As I remember using compileClasspath already makes compilation work. And compileOnly creates problem downstream because it adds the dependency to the POM. I think we should have a reproducer for #11 first

@0xera
Copy link
Collaborator Author

0xera commented Sep 23, 2024

I tried to publish the library with compileOnly and the dependency did not appear in the pom file. I also found this discussion https://discuss.gradle.org/t/publishing-plugin-should-respect-compileonly-configuration/22903 And checked old fat aar plugins - they also add dependencies with compileOnly. This trick seems to work

@0xera
Copy link
Collaborator Author

0xera commented Sep 23, 2024

No, i could not reproduce #11. Also author says first crash does not happen anymore

@0xera
Copy link
Collaborator Author

0xera commented Sep 29, 2024

I have found why there is a problem with META-INF. It is because shadow jar uses Gradle Api from 8.3 version, so building a library with lower version than 8.3 will led to the crash. We could write about these limitations in the README

Снимок экрана 2024-09-29 в 12 50 36
Снимок экрана 2024-09-29 в 12 50 46

@0xera
Copy link
Collaborator Author

0xera commented Oct 8, 2024

Hi, @natario1 I have added a functional test and you can run it to make sure that compileOnly dependencies are not in a pom file

@natario1
Copy link
Member

natario1 commented Oct 8, 2024

@0xera I approved it, my doubt is whether this really fixes anything. compileClasspath always worked well regarding adding deps to the compilation classpath, so if it works we shouldn't change it. But feel free to merge if you reproduced issues with compileClasspath that are solved by compileOnly.

@0xera 0xera merged commit c4dae7c into deepmedia:main Oct 8, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants