Revert^2 "Rename DexJar interface method to DexJarBuildPath."
This reverts commit b0dc851ff4
.
Reason for revert: relanding original change. Build failures were
caused by a race with another CL: https://r.android.com/1320920
Test: lunch aosp_cf_x86_phone-userdebug && m
Change-Id: Ic9016582dae7773b4d4f84a63425f1ef7a5d061f
This commit is contained in:
committed by
Ulya Trafimovich
parent
c55b679e7b
commit
5539e7b568
@@ -1650,14 +1650,14 @@ func apexFileForShBinary(ctx android.BaseModuleContext, sh *sh.ShBinary) apexFil
|
|||||||
}
|
}
|
||||||
|
|
||||||
type javaDependency interface {
|
type javaDependency interface {
|
||||||
DexJar() android.Path
|
DexJarBuildPath() android.Path
|
||||||
JacocoReportClassesFile() android.Path
|
JacocoReportClassesFile() android.Path
|
||||||
Stem() string
|
Stem() string
|
||||||
}
|
}
|
||||||
|
|
||||||
func apexFileForJavaLibrary(ctx android.BaseModuleContext, lib javaDependency, module android.Module) apexFile {
|
func apexFileForJavaLibrary(ctx android.BaseModuleContext, lib javaDependency, module android.Module) apexFile {
|
||||||
dirInApex := "javalib"
|
dirInApex := "javalib"
|
||||||
fileToCopy := lib.DexJar()
|
fileToCopy := lib.DexJarBuildPath()
|
||||||
af := newApexFile(ctx, fileToCopy, module.Name(), dirInApex, javaSharedLib, module)
|
af := newApexFile(ctx, fileToCopy, module.Name(), dirInApex, javaSharedLib, module)
|
||||||
af.jacocoReportClassesFile = lib.JacocoReportClassesFile()
|
af.jacocoReportClassesFile = lib.JacocoReportClassesFile()
|
||||||
af.stem = lib.Stem() + ".jar"
|
af.stem = lib.Stem() + ".jar"
|
||||||
|
@@ -730,7 +730,7 @@ func (a *AARImport) ImplementationAndResourcesJars() android.Paths {
|
|||||||
return android.Paths{a.classpathFile}
|
return android.Paths{a.classpathFile}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *AARImport) DexJar() android.Path {
|
func (a *AARImport) DexJarBuildPath() android.Path {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1882,7 +1882,7 @@ func (u *usesLibrary) usesLibraryPaths(ctx android.ModuleContext) map[string]and
|
|||||||
if !ctx.Config().UnbundledBuild() {
|
if !ctx.Config().UnbundledBuild() {
|
||||||
ctx.VisitDirectDepsWithTag(usesLibTag, func(m android.Module) {
|
ctx.VisitDirectDepsWithTag(usesLibTag, func(m android.Module) {
|
||||||
if lib, ok := m.(Dependency); ok {
|
if lib, ok := m.(Dependency); ok {
|
||||||
if dexJar := lib.DexJar(); dexJar != nil {
|
if dexJar := lib.DexJarBuildPath(); dexJar != nil {
|
||||||
usesLibPaths[ctx.OtherModuleName(m)] = dexJar
|
usesLibPaths[ctx.OtherModuleName(m)] = dexJar
|
||||||
} else {
|
} else {
|
||||||
ctx.ModuleErrorf("module %q in uses_libs or optional_uses_libs must produce a dex jar, does it have installable: true?",
|
ctx.ModuleErrorf("module %q in uses_libs or optional_uses_libs must produce a dex jar, does it have installable: true?",
|
||||||
|
@@ -150,7 +150,7 @@ func (d *DeviceHostConverter) ImplementationAndResourcesJars() android.Paths {
|
|||||||
return d.implementationAndResourceJars
|
return d.implementationAndResourceJars
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *DeviceHostConverter) DexJar() android.Path {
|
func (d *DeviceHostConverter) DexJarBuildPath() android.Path {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -255,7 +255,7 @@ func getBootImageJar(ctx android.SingletonContext, image *bootImageConfig, modul
|
|||||||
return -1, nil
|
return -1, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
jar, hasJar := module.(interface{ DexJar() android.Path })
|
jar, hasJar := module.(interface{ DexJarBuildPath() android.Path })
|
||||||
if !hasJar {
|
if !hasJar {
|
||||||
return -1, nil
|
return -1, nil
|
||||||
}
|
}
|
||||||
@@ -296,7 +296,7 @@ func getBootImageJar(ctx android.SingletonContext, image *bootImageConfig, modul
|
|||||||
panic("unknown boot image: " + image.name)
|
panic("unknown boot image: " + image.name)
|
||||||
}
|
}
|
||||||
|
|
||||||
return index, jar.DexJar()
|
return index, jar.DexJarBuildPath()
|
||||||
}
|
}
|
||||||
|
|
||||||
// buildBootImage takes a bootImageConfig, creates rules to build it, and returns the image.
|
// buildBootImage takes a bootImageConfig, creates rules to build it, and returns the image.
|
||||||
|
@@ -147,7 +147,7 @@ func stubFlagsRule(ctx android.SingletonContext) {
|
|||||||
name := ctx.ModuleName(module)
|
name := ctx.ModuleName(module)
|
||||||
for moduleList, pathList := range moduleListToPathList {
|
for moduleList, pathList := range moduleListToPathList {
|
||||||
if i := android.IndexList(name, *moduleList); i != -1 {
|
if i := android.IndexList(name, *moduleList); i != -1 {
|
||||||
pathList[i] = j.DexJar()
|
pathList[i] = j.DexJarBuildPath()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -501,7 +501,7 @@ type Dependency interface {
|
|||||||
ImplementationJars() android.Paths
|
ImplementationJars() android.Paths
|
||||||
ResourceJars() android.Paths
|
ResourceJars() android.Paths
|
||||||
ImplementationAndResourcesJars() android.Paths
|
ImplementationAndResourcesJars() android.Paths
|
||||||
DexJar() android.Path
|
DexJarBuildPath() android.Path
|
||||||
AidlIncludeDirs() android.Paths
|
AidlIncludeDirs() android.Paths
|
||||||
ExportedSdkLibs() []string
|
ExportedSdkLibs() []string
|
||||||
ExportedPlugins() (android.Paths, []string)
|
ExportedPlugins() (android.Paths, []string)
|
||||||
@@ -1739,7 +1739,7 @@ func (j *Module) ImplementationJars() android.Paths {
|
|||||||
return android.Paths{j.implementationJarFile}
|
return android.Paths{j.implementationJarFile}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (j *Module) DexJar() android.Path {
|
func (j *Module) DexJarBuildPath() android.Path {
|
||||||
return j.dexJarFile
|
return j.dexJarFile
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2565,7 +2565,7 @@ func (j *Import) ImplementationAndResourcesJars() android.Paths {
|
|||||||
return android.Paths{j.combinedClasspathFile}
|
return android.Paths{j.combinedClasspathFile}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (j *Import) DexJar() android.Path {
|
func (j *Import) DexJarBuildPath() android.Path {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2752,7 +2752,7 @@ func (j *DexImport) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
|||||||
j.Stem()+".jar", dexOutputFile)
|
j.Stem()+".jar", dexOutputFile)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (j *DexImport) DexJar() android.Path {
|
func (j *DexImport) DexJarBuildPath() android.Path {
|
||||||
return j.dexJarFile
|
return j.dexJarFile
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user