Merge "java_sdk_library: Allow no_dist to be explicitly set in .bp file"
This commit is contained in:
@@ -435,8 +435,8 @@ type sdkLibraryProperties struct {
|
|||||||
// If set to true, the path of dist files is apistubs/core. Defaults to false.
|
// If set to true, the path of dist files is apistubs/core. Defaults to false.
|
||||||
Core_lib *bool
|
Core_lib *bool
|
||||||
|
|
||||||
// don't create dist rules.
|
// If set to true then don't create dist rules.
|
||||||
No_dist *bool `blueprint:"mutated"`
|
No_dist *bool
|
||||||
|
|
||||||
// indicates whether system and test apis should be generated.
|
// indicates whether system and test apis should be generated.
|
||||||
Generate_system_and_test_apis bool `blueprint:"mutated"`
|
Generate_system_and_test_apis bool `blueprint:"mutated"`
|
||||||
@@ -1509,12 +1509,16 @@ func (module *SdkLibrary) CreateInternalModules(mctx android.DefaultableHookCont
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If this builds against standard libraries (i.e. is not part of the core libraries)
|
// If this builds against standard libraries (i.e. is not part of the core libraries)
|
||||||
// then assume it provides both system and test apis. Otherwise, assume it does not and
|
// then assume it provides both system and test apis.
|
||||||
// also assume it does not contribute to the dist build.
|
|
||||||
sdkDep := decodeSdkDep(mctx, sdkContext(&module.Library))
|
sdkDep := decodeSdkDep(mctx, sdkContext(&module.Library))
|
||||||
hasSystemAndTestApis := sdkDep.hasStandardLibs()
|
hasSystemAndTestApis := sdkDep.hasStandardLibs()
|
||||||
module.sdkLibraryProperties.Generate_system_and_test_apis = hasSystemAndTestApis
|
module.sdkLibraryProperties.Generate_system_and_test_apis = hasSystemAndTestApis
|
||||||
module.sdkLibraryProperties.No_dist = proptools.BoolPtr(!hasSystemAndTestApis)
|
|
||||||
|
// Unless explicitly specified assume that any module that does not provide system
|
||||||
|
// and test APIs should not contribute to the dist build.
|
||||||
|
if module.sdkLibraryProperties.No_dist == nil {
|
||||||
|
module.sdkLibraryProperties.No_dist = proptools.BoolPtr(!hasSystemAndTestApis)
|
||||||
|
}
|
||||||
|
|
||||||
missing_current_api := false
|
missing_current_api := false
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user