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

Allow Proguard to be used for Fast Deployment Environments #1337

Open
dellis1972 opened this Issue Feb 26, 2018 · 5 comments

Comments

Projects
None yet
5 participants
@dellis1972
Copy link
Contributor

dellis1972 commented Feb 26, 2018

Context https://bugzilla.xamarin.com/show_bug.cgi?id=55117

Many of our users are hitting dev limits when developing Xamarin.Forms based applications.
One of the ways to work around this issues it seems is to enable proguard. This can minimise the byte code in the .class files which results in smaller .dex files.

However our build system does not allow proguard to be used for fast deployment. So in order to use it they have to disable fast deployment which slows down development time.

@jonpryor @atsushieno Are there reasons for not allowing proguard for fast deployment? Looking at. [1] it seems Android Studio does do this by default, even for debug builds.

[1] https://bugzilla.xamarin.com/show_bug.cgi?id=55117#c6

@atsushieno

This comment has been minimized.

Copy link
Contributor

atsushieno commented Feb 26, 2018

If it is about the improved fast deployment, should developers even enable proguard for debugging where the jar complication for libraries is one-time (for each clean build) and no recurring dexing occurs? Multi-dexing is the premised process for the improved fast deployment.

If it is about current fast deployment, I have no idea; people should feel free to enable proguard if it improves performance. But is there any case where proguard should be involved if there is no change in JCWs?

@dhaligas

This comment has been minimized.

Copy link

dhaligas commented Feb 26, 2018

when trying to use Fast deployment and multi-dex together the apps fails on startup with this error in this bug https://bugzilla.xamarin.com/show_bug.cgi?id=55050

@jonpryor

This comment has been minimized.

Copy link
Contributor

jonpryor commented Feb 26, 2018

I believe that the rationale for disabling ProGuard in Debug builds was to speed up Debug builds. I don't immediately see any reason why we couldn't use ProGuard in Debug builds.

Though, looking around, I don't see how ProGuard is disabled in Debug builds. It looks like it just follows $(AndroidEnableProguard).

Related: we need to get this finished: #609

@IgorPietraszko

This comment has been minimized.

Copy link

IgorPietraszko commented Mar 12, 2018

I had perfectly working builds in VSTS, added Xamarin...Support.V14.Preference (25.4.0.2) and it broke the build. Tried different ProGuard and Multi-desx options to no avail. tried switching between JDK 1.7 and 1.8 - nochange. Tried x86 or x64 JDK options - no change. What gives? I have a Debug build and a Release build. What are the suggested settings for either configuration to get around this problem.

@atsushieno

This comment has been minimized.

Copy link
Contributor

atsushieno commented Mar 13, 2018

If changing proguard setting didn't resolve the problem, it is irrelevant to this github issue. If you have some other project that you believe should build, please file another issue with more details?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment