Remove the concept of useDefaultLibs from Soong.
This field in the java/sdk structure was used in two of the many possible configurations, so it wasn't really a "default". It also meant that, to understand those configurations, the reader had to know what was considered the default, which was only possibly by reading the code in java.go and droiddoc.go which implemented special code paths when useDefaultLibs was true. By eliminating that setting and explicitly setting the required values, the code is simpler and easier to understand. This change is a straight refactoring, in the sense that the output of the build should be unchanged. Regarding the changes to the proguardRaiseTag dependency in java.go: - This is a noop for anything which had sdkDep.useModule = true prior to this change, because they all had the same value for hasFrameworkLibs() and hasStandardLibs(). - This is a noop for anything which had sdkDep.useDefaultLibs = true prior to this change, because they do not use proguard settings. - Therefore, it is a noop overall. - Nevertheless, it is required to make sdkCorePlatform work. Without this change, such modules would pick up a dependency on framework libs via the (unused) proguardRaiseTag, which creates a circular dependency, because this is the sdk_version used when building framework libs themselves. Bug: 157640067 Test: m java docs droid Change-Id: I3a83b5edc1bd48c16b55f6f77e3e710fc8fbd8fa
This commit is contained in:
@@ -412,7 +412,10 @@ func decodeSdkDep(ctx android.EarlyModuleContext, sdkContext sdkContext) sdkDep
|
||||
switch sdkVersion.kind {
|
||||
case sdkPrivate:
|
||||
return sdkDep{
|
||||
useDefaultLibs: true,
|
||||
useModule: true,
|
||||
systemModules: config.LegacyCorePlatformSystemModules,
|
||||
bootclasspath: config.LegacyCorePlatformBootclasspathLibraries,
|
||||
classpath: config.FrameworkLibraries,
|
||||
frameworkResModule: "framework-res",
|
||||
}
|
||||
case sdkNone:
|
||||
@@ -434,7 +437,9 @@ func decodeSdkDep(ctx android.EarlyModuleContext, sdkContext sdkContext) sdkDep
|
||||
}
|
||||
case sdkCorePlatform:
|
||||
return sdkDep{
|
||||
useDefaultLibs: true,
|
||||
useModule: true,
|
||||
systemModules: config.LegacyCorePlatformSystemModules,
|
||||
bootclasspath: config.LegacyCorePlatformBootclasspathLibraries,
|
||||
frameworkResModule: "framework-res",
|
||||
noFrameworksLibs: true,
|
||||
}
|
||||
|
Reference in New Issue
Block a user