Interface FluxoShrinkerConfig
-
- All Implemented Interfaces:
public interface FluxoShrinkerConfig
-
-
Method Summary
Modifier and Type Method Description abstract Property<Boolean>getReplaceOutgoingJar()Replaces the default jar in outgoingVariants with the shrinked one. abstract Property<String>getMaxHeapSize()The maximum heap size for the shrinker process. abstract ConfigurableFileCollectiongetConfigurationFiles()Optionals configuration files for the shrinker. abstract Property<Boolean>getObfuscate()Whether to obfuscate the output artifacts. abstract Property<Boolean>getOptimize()Whether to optimize the output artifacts. abstract Property<Boolean>getUseR8()Whether to use R8 instead of ProGuard. abstract Property<Boolean>getR8FullMode()Whether to use R8 in full mode, also called "non-compat mode". abstract Property<Boolean>getUseBothShrinkers()Whether to create tasks for both R8 and ProGuard. abstract Property<Boolean>getForceUnbundledShrinker()Whether to always use external R8 jar instead of the one bundled/avaliable in the classpath. abstract Property<Boolean>getForceExternalShrinkerRun()Whether to always use external CLI run of R8 or ProGuard. abstract Property<Boolean>getAutoGenerateKeepRulesFromApis()trueby default.abstract Property<String>getAutoGenerateKeepModifiers()Keep rule modifiers for all auto-kept classes. -
-
Method Detail
-
getReplaceOutgoingJar
abstract Property<Boolean> getReplaceOutgoingJar()
Replaces the default jar in outgoingVariants with the shrinked one.
trueby default.Note: Because it replaces the existing jar, the variant will keep the dependencies and attributes of the java component. In particular, "org.gradle.dependency.bundling" will be "external" despite the shrinked version can shade some dependencies.
See org.gradle.api.artifacts.dsl.ArtifactHandler for more details.
-
getMaxHeapSize
abstract Property<String> getMaxHeapSize()
The maximum heap size for the shrinker process. Only used for unbundled R8 or ProGuard.
nullby default.
-
getConfigurationFiles
abstract ConfigurableFileCollection getConfigurationFiles()
Optionals configuration files for the shrinker.
pg/rules.proalways included if it exists.
-
getObfuscate
abstract Property<Boolean> getObfuscate()
Whether to obfuscate the output artifacts.
falseby default.
-
getOptimize
abstract Property<Boolean> getOptimize()
Whether to optimize the output artifacts.
trueby default.
-
getUseR8
abstract Property<Boolean> getUseR8()
Whether to use R8 instead of ProGuard.
R8 is better optimized for Android, but more fretful and can be tricky to configure. ProGuard seems to provide better results for JVM library artifacts.
falseby default.
-
getR8FullMode
abstract Property<Boolean> getR8FullMode()
Whether to use R8 in full mode, also called "non-compat mode".
android.enableR8.fullModegradle property enables it for android builds. See docs for more details.falseby default.
-
getUseBothShrinkers
abstract Property<Boolean> getUseBothShrinkers()
Whether to create tasks for both R8 and ProGuard.
falseby default.
-
getForceUnbundledShrinker
abstract Property<Boolean> getForceUnbundledShrinker()
Whether to always use external R8 jar instead of the one bundled/avaliable in the classpath.
falseby default.
-
getForceExternalShrinkerRun
abstract Property<Boolean> getForceExternalShrinkerRun()
Whether to always use external CLI run of R8 or ProGuard.
falseby default.
-
getAutoGenerateKeepRulesFromApis
abstract Property<Boolean> getAutoGenerateKeepRulesFromApis()
trueby default.
-
getAutoGenerateKeepModifiers
abstract Property<String> getAutoGenerateKeepModifiers()
Keep rule modifiers for all auto-kept classes.
,includedescriptorclassesby default.
-
-
-
-