diff options
author | Nan Zhang <nanzhang@google.com> | 2018-09-19 12:40:06 -0700 |
---|---|---|
committer | Nan Zhang <nanzhang@google.com> | 2018-09-25 14:10:00 -0700 |
commit | 199645cd7633ac6704ef03b203a7edb014cb7ea1 (patch) | |
tree | 3fde426bb61b75db4044907cc722b5e3cd0fb1a4 /java/droiddoc.go | |
parent | 5994b620f26885879384c7999b16e9c58e6ac0ca (diff) | |
download | android_build_soong-199645cd7633ac6704ef03b203a7edb014cb7ea1.tar.gz android_build_soong-199645cd7633ac6704ef03b203a7edb014cb7ea1.tar.bz2 android_build_soong-199645cd7633ac6704ef03b203a7edb014cb7ea1.zip |
Add --proguard option to metalava
Also clean-up properties comments
Test: m -j docs
Bug: b/78245848
Change-Id: I43899e9841e0d29e5be7ab2b393cc78186970231
Diffstat (limited to 'java/droiddoc.go')
-rw-r--r-- | java/droiddoc.go | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/java/droiddoc.go b/java/droiddoc.go index e9b7c0e1..bfe72f68 100644 --- a/java/droiddoc.go +++ b/java/droiddoc.go @@ -307,31 +307,34 @@ type DroidstubsProperties struct { // the tag name used to distinguish if the API files belong to public/system/test. Api_tag_name *string - // the generated public API filename by Doclava. + // the generated public API filename by Metalava. Api_filename *string - // the generated public Dex API filename by Doclava. + // the generated public Dex API filename by Metalava. Dex_api_filename *string - // the generated private API filename by Doclava. + // the generated private API filename by Metalava. Private_api_filename *string - // the generated private Dex API filename by Doclava. + // the generated private Dex API filename by Metalava. Private_dex_api_filename *string - // the generated removed API filename by Doclava. + // the generated removed API filename by Metalava. Removed_api_filename *string - // the generated removed Dex API filename by Doclava. + // the generated removed Dex API filename by Metalava. Removed_dex_api_filename *string // mapping of dex signatures to source file and line number. This is a temporary property and // will be deleted; you probably shouldn't be using it. Dex_mapping_filename *string - // the generated exact API filename by Doclava. + // the generated exact API filename by Metalava. Exact_api_filename *string + // the generated proguard filename by Metalava. + Proguard_filename *string + Check_api struct { Last_released ApiToCheck @@ -1213,6 +1216,7 @@ type Droidstubs struct { removedDexApiFile android.WritablePath apiMappingFile android.WritablePath exactApiFile android.WritablePath + proguardFile android.WritablePath checkCurrentApiTimestamp android.WritablePath updateCurrentApiTimestamp android.WritablePath @@ -1363,6 +1367,12 @@ func (d *Droidstubs) collectStubsFlags(ctx android.ModuleContext, *implicitOutputs = append(*implicitOutputs, d.apiMappingFile) } + if String(d.properties.Proguard_filename) != "" { + d.proguardFile = android.PathForModuleOut(ctx, String(d.properties.Proguard_filename)) + metalavaFlags += " --proguard " + d.proguardFile.String() + *implicitOutputs = append(*implicitOutputs, d.proguardFile) + } + if Bool(d.properties.Write_sdk_values) { metalavaFlags = metalavaFlags + " --sdk-values " + android.PathForModuleOut(ctx, "out").String() } |