This repository has been archived by the owner on Oct 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 113
Proguard
lyricallogical edited this page Mar 20, 2012
·
3 revisions
You can add additional config parameters with the setting proguardOption
:
settings = ... ++ Seq(
proguardOption in Android := "-keep class com.foo.Bar"
)
The plugin allows to run ProGuard optimizations on your classes. This
might improve the performance of your application dramatically, but also
break it easily. By default, ProGuard shrinks and optimizes the application.
To skip optimization, add the -dontoptimize
flag to the
proGuardOptimizations
val
.
If you want to apply optimizations, you specify ProGuard optimization options in your project like this:
lazy val someOptimizedProject = Project(
id = ...,
...
settings = ... ++ Seq(
proguardOptimizations in Android := Seq(
"-optimizationpasses 8",
"-dontpreverify",
"-allowaccessmodification",
"-optimizations !code/simplification/arithmetic"
)
)
)
Please note that you will receive even more warnings from ProGuard and dex when you apply optimizations.
- Getting started
- Scala versions
- Android Manifest generation
- Typed resources references
- ProGuard
- DDMS integration
- Building Java Android projects
- Building NDK projects
- Consuming Android Library projects
- Github integration
- Building Android Test Projects
- Password Manager
- Releasing to the Android Market
- Projects using sbt-android-plugin
- Contributors