Gintas_
Gintas_

Reputation: 5030

How to inspect proguard process, so I know what takes so long?

My release build is stuck on

:android:transformClassesAndResourcesWithProguardForRelease

for 10 minutes. Gradle console does not print anything. How do I make it print what proguard is doing, so I know where the problem could be?

Upvotes: 4

Views: 1631

Answers (1)

T. Neidhart
T. Neidhart

Reputation: 6200

You need to add the following to your proguard configuration file:

-verbose

Additionally, you need to enable info logging for your gradle build via

gradle -i <target>

where target is the actual task your are running (most likely assembleRelease).

Then you will see more output and what ProGuard is currently doing. Based on experience, the optimization step can take a long time, so you might want to reduce the number of optimization passes using:

-optimizationpasses 3

Upvotes: 2

Related Questions