Merge "Add new properties"
This commit is contained in:
@@ -117,6 +117,17 @@ type sdkLibraryProperties struct {
|
|||||||
Javacflags []string
|
Javacflags []string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Additional droiddoc options
|
||||||
|
Droiddoc_options []string
|
||||||
|
|
||||||
|
// If set to true, compile dex regardless of installable. Defaults to false.
|
||||||
|
// This applies to the stubs lib.
|
||||||
|
Compile_dex *bool
|
||||||
|
|
||||||
|
// the sub dirs under srcs_lib_whitelist_dirs will be scanned for java srcs.
|
||||||
|
// Defaults to "android.annotation".
|
||||||
|
Srcs_lib_whitelist_pkgs []string
|
||||||
|
|
||||||
// TODO: determines whether to create HTML doc or not
|
// TODO: determines whether to create HTML doc or not
|
||||||
//Html_doc *bool
|
//Html_doc *bool
|
||||||
}
|
}
|
||||||
@@ -359,6 +370,7 @@ func (module *sdkLibrary) createStubsLibrary(mctx android.TopDownMutatorContext,
|
|||||||
Soc_specific *bool
|
Soc_specific *bool
|
||||||
Device_specific *bool
|
Device_specific *bool
|
||||||
Product_specific *bool
|
Product_specific *bool
|
||||||
|
Compile_dex *bool
|
||||||
Product_variables struct {
|
Product_variables struct {
|
||||||
Unbundled_build struct {
|
Unbundled_build struct {
|
||||||
Enabled *bool
|
Enabled *bool
|
||||||
@@ -377,6 +389,9 @@ func (module *sdkLibrary) createStubsLibrary(mctx android.TopDownMutatorContext,
|
|||||||
// Unbundled apps will use the prebult one from /prebuilts/sdk
|
// Unbundled apps will use the prebult one from /prebuilts/sdk
|
||||||
props.Product_variables.Unbundled_build.Enabled = proptools.BoolPtr(false)
|
props.Product_variables.Unbundled_build.Enabled = proptools.BoolPtr(false)
|
||||||
props.Product_variables.Pdk.Enabled = proptools.BoolPtr(false)
|
props.Product_variables.Pdk.Enabled = proptools.BoolPtr(false)
|
||||||
|
if module.properties.Compile_dex != nil {
|
||||||
|
props.Compile_dex = module.properties.Compile_dex
|
||||||
|
}
|
||||||
|
|
||||||
if module.SocSpecific() {
|
if module.SocSpecific() {
|
||||||
props.Soc_specific = proptools.BoolPtr(true)
|
props.Soc_specific = proptools.BoolPtr(true)
|
||||||
@@ -430,7 +445,7 @@ func (module *sdkLibrary) createDocs(mctx android.TopDownMutatorContext, apiScop
|
|||||||
droiddocArgs := " -hide 110 -hide 111 -hide 113 -hide 121 -hide 125 -hide 126 -hide 127 -hide 128" +
|
droiddocArgs := " -hide 110 -hide 111 -hide 113 -hide 121 -hide 125 -hide 126 -hide 127 -hide 128" +
|
||||||
" -stubpackages " + strings.Join(module.properties.Api_packages, ":") +
|
" -stubpackages " + strings.Join(module.properties.Api_packages, ":") +
|
||||||
" " + android.JoinWithPrefix(module.properties.Hidden_api_packages, "-hidePackage ") +
|
" " + android.JoinWithPrefix(module.properties.Hidden_api_packages, "-hidePackage ") +
|
||||||
" -nodocs"
|
" " + android.JoinWithPrefix(module.properties.Droiddoc_options, "-") + " -nodocs"
|
||||||
switch apiScope {
|
switch apiScope {
|
||||||
case apiScopeSystem:
|
case apiScopeSystem:
|
||||||
droiddocArgs = droiddocArgs + " -showAnnotation android.annotation.SystemApi"
|
droiddocArgs = droiddocArgs + " -showAnnotation android.annotation.SystemApi"
|
||||||
@@ -488,7 +503,11 @@ func (module *sdkLibrary) createDocs(mctx android.TopDownMutatorContext, apiScop
|
|||||||
props.Srcs_lib_whitelist_dirs = []string{"core/java"}
|
props.Srcs_lib_whitelist_dirs = []string{"core/java"}
|
||||||
// Add android.annotation package to give access to the framework-defined
|
// Add android.annotation package to give access to the framework-defined
|
||||||
// annotations such as SystemApi, NonNull, etc.
|
// annotations such as SystemApi, NonNull, etc.
|
||||||
|
if module.properties.Srcs_lib_whitelist_pkgs != nil {
|
||||||
|
props.Srcs_lib_whitelist_pkgs = module.properties.Srcs_lib_whitelist_pkgs
|
||||||
|
} else {
|
||||||
props.Srcs_lib_whitelist_pkgs = []string{"android.annotation"}
|
props.Srcs_lib_whitelist_pkgs = []string{"android.annotation"}
|
||||||
|
}
|
||||||
// These libs are required by doclava to parse the framework sources add via
|
// These libs are required by doclava to parse the framework sources add via
|
||||||
// Src_lib and Src_lib_whitelist_* properties just above.
|
// Src_lib and Src_lib_whitelist_* properties just above.
|
||||||
// If we don't add them to the classpath, errors messages are generated by doclava,
|
// If we don't add them to the classpath, errors messages are generated by doclava,
|
||||||
|
Reference in New Issue
Block a user