Skip to content

Commit

Permalink
Handle desugared_lib_config in src/tools/ak/dex
Browse files Browse the repository at this point in the history
Part of #122

PiperOrigin-RevId: 622183260
Change-Id: Iaa4ad14faa99acd0743a8e1d5387401a916c44b9
  • Loading branch information
ted-xie authored and copybara-github committed Apr 5, 2024
1 parent 0709076 commit 65eb82b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/tools/ak/dex/dex.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ var (
desugar, androidJar, dexbuilder, in string
classpaths, outs, outputDir flags.StringList
desugarCoreLibs bool
desugaredLibConfig string
minSdkVersion int

initOnce sync.Once
Expand All @@ -73,6 +74,7 @@ func Init() {
flag.StringVar(&androidJar, "android_jar", "", "Required for desugar, path to android.jar")
flag.Var(&classpaths, "classpath", "(Optional) Path to library resource(s) for desugar")
flag.BoolVar(&desugarCoreLibs, "desugar_core_libs", false, "Desugar Java 8 core libs, default false")
flag.StringVar(&desugaredLibConfig, "desugared_lib_config", "", "Path to desugared lib config")
flag.StringVar(&dexbuilder, "dexbuilder", "", "Path to dexbuilder")
flag.StringVar(&in, "in", "", "Path to input")
flag.Var(&outs, "out", "Path to output, if more than one specified, output is sharded across files.")
Expand Down Expand Up @@ -185,6 +187,10 @@ func desugarJar(in, out string) error {
}
if desugarCoreLibs {
args = append(args, "--desugar_supported_core_libs")

if desugaredLibConfig != "" {
args = append(args, "--desugared_lib_config", desugaredLibConfig)
}
}
for _, cp := range classpaths {
args = append(args, "--classpath_entry", cp)
Expand Down

0 comments on commit 65eb82b

Please sign in to comment.