-
Notifications
You must be signed in to change notification settings - Fork 36
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
Gretty 3.0.8+ is incompatible with Proguard 7.3.0
#277
Comments
This is really nasty. I have an unconfirmed hypothesis of what might have happened. We upgraded dependencies: v3.0.7...gretty-gradle-plugin:gretty:v3.0.8 Therefore, we upgraded "org.springframework.boot:spring-boot-devtools", and by transitive dependency, "org.springframework.boot:spring-boot", from 2.0.2.RELEASE to 2.6.3. Eventually, spring-boot adding There is no obvious version conflict, because spring-boot does not add another version of log4j-api on the classpath. Nonetheless, the newer spring-boot puts
on the class path, and ProGuards log4j initialization happily reads that. This is the point where my analysis gets fuzzy :D Why do we have Spring Boot on Gretty's plugin classpath? Let' run
This is a really massive dependency tree for supporting only a single feature on Gretty, namely the LiveReload server, which can reload the browser when the server code changes. If it was for me, I'd just drop support for LiveReload server from Gretty, and see if the incompatibility, caused by the dependency problem, persists. Another option would be to copy the 5 classes we actually use from spring-boot-devtools over to Gretty. In both approaches, Gretty would do fine without entire Spring (Boot) on the plugin's classpath. I'm happy to hear an opinion on this @boris-petrov! |
@f4lco thanks for the detailed analysis! I'm still not sure what exactly the problem is but I guess your reasoning is sound and the issue follows from what you say. I don't think LiveReload is abandoned - this issue for example suggests that they want to continue supporting it. But I'm totally fine with removing it though. I'm not using it so I don't mind. 😄 Not sure if that's the right way... but we could try and see if anybody complains. 😄 Should I take a shot at removing it? |
I'm unsure @boris-petrov. How many features can we steal from Gretty...? It's been a mistake to hard-wire Spring into Gretty's tasks. That is why a simple dependency exclusion will not fix your issue, sadly:
I do not have a strong opinion on this, it's either removal or rework... otherwise the dependency setup as-is will cause problems down the road, not only with ProGuard. |
As that causes conflicts in user projects: #277
As that causes conflicts in user projects: #277
This issue has been resolved as of Gretty 3.1.1! Thanks @f4lco for the insight and help! |
As that causes conflicts in user projects: #277
build.gradle
:settings.gradle
:include 'foo'
foo/build.gradle
:Running
gradle foo:proguardFoo
(with Gradle 7.5.1) on this fails with:Downgrading
ProGuard
to7.2.2
or downgrading Gretty to3.0.7
fixes the issue (i.e. there is another exceptionIndex 0 out of bounds for length 0
which is normal however).Initially I thought that this was because of the recent changes to classloader filtering (as I'm using Gretty 3.1.0 and was testing with it). However, the fact that Gretty 3.0.8 also doesn't work... is extremely strange. Also note that Gretty is not even applied here but without this line, it works correctly.
@f4lco, any ideas?
The text was updated successfully, but these errors were encountered: