diff options
Diffstat (limited to 'java')
-rw-r--r-- | java/dex.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/java/dex.go b/java/dex.go index ed2df2103..b32d5aee0 100644 --- a/java/dex.go +++ b/java/dex.go @@ -103,6 +103,19 @@ type DexProperties struct { // If true, transitive reverse dependencies of this module will have this // module's proguard spec appended to their optimization action Export_proguard_flags_files *bool + + // Path to a file containing a list of class names that should not be compiled using R8. + // These classes will be compiled by D8 similar to when Optimize.Enabled is false. + // + // Example: + // + // r8.exclude: + // com.example.Foo + // com.example.Bar + // com.example.Bar$Baz + // + // By default all classes are compiled using R8 when Optimize.Enabled is set. + Exclude *string `android:"path"` } // Keep the data uncompressed. We always need uncompressed dex for execution, @@ -528,6 +541,11 @@ func (d *dexer) r8Flags(ctx android.ModuleContext, dexParams *compileDexParams, r8Flags = append(r8Flags, "--store-store-fence-constructor-inlining") } + if opt.Exclude != nil { + r8Flags = append(r8Flags, "--exclude", *opt.Exclude) + r8Deps = append(r8Deps, android.PathForModuleSrc(ctx, *opt.Exclude)) + } + return r8Flags, r8Deps, artProfileOutput } |