Merge "java_sdk_library: Simplify SdkLibrary.sdkJars"
This commit is contained in:
@@ -1296,14 +1296,15 @@ func PrebuiltJars(ctx android.BaseModuleContext, baseName string, s sdkSpec) and
|
|||||||
func (module *SdkLibrary) sdkJars(ctx android.BaseModuleContext, sdkVersion sdkSpec, headerJars bool) android.Paths {
|
func (module *SdkLibrary) sdkJars(ctx android.BaseModuleContext, sdkVersion sdkSpec, headerJars bool) android.Paths {
|
||||||
|
|
||||||
// Check any special cases for java_sdk_library.
|
// Check any special cases for java_sdk_library.
|
||||||
if !sdkVersion.specified() {
|
//
|
||||||
|
// Only allow access to the implementation library in the following condition:
|
||||||
|
// * No sdk_version specified on the referencing module.
|
||||||
|
if sdkVersion.kind == sdkPrivate {
|
||||||
if headerJars {
|
if headerJars {
|
||||||
return module.HeaderJars()
|
return module.HeaderJars()
|
||||||
} else {
|
} else {
|
||||||
return module.ImplementationJars()
|
return module.ImplementationJars()
|
||||||
}
|
}
|
||||||
} else if sdkVersion.kind == sdkPrivate {
|
|
||||||
return module.HeaderJars()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return module.selectHeaderJarsForSdkVersion(ctx, sdkVersion)
|
return module.selectHeaderJarsForSdkVersion(ctx, sdkVersion)
|
||||||
|
Reference in New Issue
Block a user