Closed dawidhyzy closed 7 years ago
Thanks for reporting. Are you trying to build your own app or one of the sample apps in this repository?
Dawid Hyży notifications@github.com schrieb am Di., 18. Apr. 2017, 16:32:
Mosby Version: 3.0.2
Expected behavior Should build with proguard
Actual behavior (include a stacktrace if crash) Not building with proguard:
Warning:com.hannesdorfmann.mosby3.mvp.delegate.FragmentMvpDelegateImpl: can't find referenced class edu.umd.cs.findbugs.annotations.SuppressFBWarnings Warning:com.hannesdorfmann.mosby3.PresenterManager: can't find referenced class edu.umd.cs.findbugs.annotations.SuppressFBWarnings Warning:com.hannesdorfmann.mosby3.mvp.delegate.ViewGroupMvpDelegateImpl: can't find referenced class edu.umd.cs.findbugs.annotations.SuppressFBWarnings Warning:com.hannesdorfmann.mosby3.mvp.delegate.ActivityMvpDelegateImpl: can't find referenced class edu.umd.cs.findbugs.annotations.SuppressFBWarnings Warning:there were 4 unresolved references to classes or interfaces.
Steps to reproduce the behavior or link to a sample repository Build with enabled proguard
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sockeqwe/mosby/issues/240, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjnrnhAaAtPPx46Dp0sysUWN3v6I7_wks5rxMl4gaJpZM4NAbdd .
My app, which I migrated from Mosby 2.0. It has few classes which implements Activity(Fragment)MvpDelegateImpl.
I will take a closer look at it on Thursday. This annotation should be part of the aar at all (should only be used during compile time).
Hello, I can confirm that I have exactly the same issue when I try to release my app with Proguard.
Ok, this should be fixed with latest 3.0.3-SNAPSHOT
(see readme of how to use snapshot).
Could you please verify that this fixes the proguard problem?
Then I will gladly release it as 3.0.3
I've just tried it and it worked fine. Thanks for the quick workaround and the library of course! Do you plan to release a new version soon?
3.0.3
has been released a minute ago. Should be available soon (may take some more minutes to sync it to maven central)
Thanks for your help!
Hmm. I have just set up my (new) project to use 3.0.3
and proguard fails with the message mentioned in this issue... It seems like it is not fixed, dunno why:
Warning: com.hannesdorfmann.mosby3.mvp.delegate.ActivityMvpViewStateDelegateImpl: can't find referenced class edu.umd.cs.findbugs.annotations.SuppressFBWarnings
Warning: com.hannesdorfmann.mosby3.mvp.delegate.FragmentMvpViewStateDelegateImpl: can't find referenced class edu.umd.cs.findbugs.annotations.SuppressFBWarnings
Warning: com.hannesdorfmann.mosby3.mvp.delegate.ViewGroupMvpViewStateDelegateImpl: can't find referenced class edu.umd.cs.findbugs.annotations.SuppressFBWarnings
Ah! That's now coming through a viewstate module, which was implicitly added as a dependency by mvp-conductor
which I am using. So this issue should be reopened I guess :)
As a workaround until new version is released, one can use
-dontwarn com.hannesdorfmann.mosby3.mvp.delegate.**
in proguard-rules.pro
Hm, so @dimsuz you are saying that you still see the error in your project with mosby conductor if you specify the versions like this:
compile 'com.hannesdorfmann.mosby3:viewstate-conductor:3.0.0'
compile 'com.hannesdorfmann.mosby3:viewstate:3.0.3'
Not exactly. I use only:
compile 'com.hannesdorfmann.mosby3:mvp-conductor:3.0.0'
and it transitively adds dependency on mosby-mvp-lce
which seems to cause build failing.
I created a separate issue/question for this implicit dependency addition:
https://github.com/sockeqwe/mosby-conductor/issues/24
Oops, copy paste error, updated my last message.
You are right, it should work if you add those 2 transitive dependencies explicitly:
compile 'com.hannesdorfmann.mosby3:viewstate-conductor:3.0.0'
compile 'com.hannesdorfmann.mosby3:viewstate:3.0.3'
compile 'com.hannesdorfmann.mosby3:mvp:3.0.3'
I will try a bit later today and report! When I add them explicitly those annotations will be filtered out? (Just curious)
In 3.0.3 I have removed this annotation at all, so that they are no longer bundled in 3.0.3. Therefore I expect that explicitly adding the 3.0.3 dependency forces mosby-conductor to use 3.0.3 internally and that the issue should be fixed.
dimsuz notifications@github.com schrieb am Di., 25. Apr. 2017, 21:38:
I will try a bit later today and report! When I add them explicitly those annotations will be filtered out? (Just curious)
— You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub https://github.com/sockeqwe/mosby/issues/240#issuecomment-297141842, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjnrn1orpceTcZ24g4zcG1xPSooHAZAks5rzkvJgaJpZM4NAbdd .
OK, it was enough to just add
compile 'com.hannesdorfmann.mosby3:viewstate:3.0.3'
Disregard my last question, I didn't notice that you suggested to just explicitly specify 3.0.3
for other artifacts. My current setup used 3.0.3
for mvp but 3.0.0
for a viewstate (transitively) which caused troubles.
Thanks for helping to sort this out! Issue solved (can't close it, no rights)
Mosby Version: 3.0.2
Expected behavior Should build with proguard
Actual behavior (include a stacktrace if crash) Not building with proguard:
Steps to reproduce the behavior or link to a sample repository Build with enabled proguard