Remove ApexBundleDepsInfo.MinSdkVersion()
For java.AndroidApp app, app.MinSdkVersion() was selected from ApexBundleDepsInfo, not from java.Module. This caused app.MinSdkVersion() to return "" always. Besides, having two embeded fields and relying on depth to choose one of them makes it hard to read. Bug: 156537348 Test: m Change-Id: Ib525b2f5132c596db8e33492d0a565ea23e91d1c
This commit is contained in:
@@ -421,21 +421,15 @@ type ApexModuleDepInfo struct {
|
|||||||
type DepNameToDepInfoMap map[string]ApexModuleDepInfo
|
type DepNameToDepInfoMap map[string]ApexModuleDepInfo
|
||||||
|
|
||||||
type ApexBundleDepsInfo struct {
|
type ApexBundleDepsInfo struct {
|
||||||
minSdkVersion string
|
|
||||||
flatListPath OutputPath
|
flatListPath OutputPath
|
||||||
fullListPath OutputPath
|
fullListPath OutputPath
|
||||||
}
|
}
|
||||||
|
|
||||||
type ApexDepsInfoIntf interface {
|
type ApexDepsInfoIntf interface {
|
||||||
MinSdkVersion() string
|
|
||||||
FlatListPath() Path
|
FlatListPath() Path
|
||||||
FullListPath() Path
|
FullListPath() Path
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *ApexBundleDepsInfo) MinSdkVersion() string {
|
|
||||||
return d.minSdkVersion
|
|
||||||
}
|
|
||||||
|
|
||||||
func (d *ApexBundleDepsInfo) FlatListPath() Path {
|
func (d *ApexBundleDepsInfo) FlatListPath() Path {
|
||||||
return d.flatListPath
|
return d.flatListPath
|
||||||
}
|
}
|
||||||
@@ -450,8 +444,6 @@ var _ ApexDepsInfoIntf = (*ApexBundleDepsInfo)(nil)
|
|||||||
// 1. FullList with transitive deps and their parents in the dep graph
|
// 1. FullList with transitive deps and their parents in the dep graph
|
||||||
// 2. FlatList with a flat list of transitive deps
|
// 2. FlatList with a flat list of transitive deps
|
||||||
func (d *ApexBundleDepsInfo) BuildDepsInfoLists(ctx ModuleContext, minSdkVersion string, depInfos DepNameToDepInfoMap) {
|
func (d *ApexBundleDepsInfo) BuildDepsInfoLists(ctx ModuleContext, minSdkVersion string, depInfos DepNameToDepInfoMap) {
|
||||||
d.minSdkVersion = minSdkVersion
|
|
||||||
|
|
||||||
var fullContent strings.Builder
|
var fullContent strings.Builder
|
||||||
var flatContent strings.Builder
|
var flatContent strings.Builder
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user