diff options
author | 2020-07-30 15:07:22 -0700 | |
---|---|---|
committer | 2020-07-31 10:11:25 -0700 | |
commit | 1e2ee12ff461624aae231a195476a81874fa9a58 (patch) | |
tree | 6b495419f71f0f2402d3a015fdbb1667fb4a5aa2 /java/droiddoc.go | |
parent | afb7c1b7e9d5d4680c15ea2dc515688d7dc7c4d7 (diff) |
Default to not creating stubs for droiddoc
This will allow us to remove `create_stubs: false` throughout the
codebase easily, then remove the functionslity to create stubs from
droiddoc.
Test: m docs
Test: m checkapi
Test: m updateapi
Bug: 144248501
Bug: 143136634
Change-Id: Ib95f68bc064fbe1475e4b25433bee6292bc005dc
Diffstat (limited to 'java/droiddoc.go')
-rw-r--r-- | java/droiddoc.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/java/droiddoc.go b/java/droiddoc.go index 935b83915..d2f8d8331 100644 --- a/java/droiddoc.go +++ b/java/droiddoc.go @@ -198,7 +198,7 @@ type DroiddocProperties struct { // the generated removed Dex API filename by Doclava. Removed_dex_api_filename *string - // if set to false, don't allow droiddoc to generate stubs source files. Defaults to true. + // if set to false, don't allow droiddoc to generate stubs source files. Defaults to false. Create_stubs *bool Check_api struct { @@ -870,6 +870,10 @@ func (d *Droiddoc) doclavaDocsFlags(ctx android.ModuleContext, cmd *android.Rule } } +func (d *Droiddoc) createStubs() bool { + return BoolDefault(d.properties.Create_stubs, false) +} + func (d *Droiddoc) stubsFlags(ctx android.ModuleContext, cmd *android.RuleBuilderCommand, stubsDir android.WritablePath) { if apiCheckEnabled(ctx, d.properties.Check_api.Current, "current") || apiCheckEnabled(ctx, d.properties.Check_api.Last_released, "last_released") || @@ -892,7 +896,7 @@ func (d *Droiddoc) stubsFlags(ctx android.ModuleContext, cmd *android.RuleBuilde cmd.FlagWithOutput("-removedDexApi ", d.removedDexApiFile) } - if BoolDefault(d.properties.Create_stubs, true) { + if d.createStubs() { cmd.FlagWithArg("-stubs ", stubsDir.String()) } |