Move java module installation into Soong

Move java module installation rules into Soong by overriding
InstallBypassMake.  Update the locations that find host java tools
to look in the Make installation directory instead of the Soong
installation directory, which will no longer be used.

Bug: 204136549
Test: m checkbuild
Change-Id: I5af6d764c97e7ddb5ee121fc9830166c25d831b1
This commit is contained in:
Colin Cross
2021-11-03 14:09:41 -07:00
parent 1d0eb7a9d0
commit 24cc4be60b
4 changed files with 24 additions and 5 deletions

View File

@@ -265,6 +265,8 @@ func (j *Module) XrefJavaFiles() android.Paths {
return j.kytheFiles
}
func (j *Module) InstallBypassMake() bool { return true }
type dependencyTag struct {
blueprint.BaseDependencyTag
name string
@@ -856,6 +858,20 @@ type JavaTestImport struct {
dexJarFile android.Path
}
func (j *Test) InstallInTestcases() bool {
// Host java tests install into $(HOST_OUT_JAVA_LIBRARIES), and then are copied into
// testcases by base_rules.mk.
return !j.Host()
}
func (j *TestHelperLibrary) InstallInTestcases() bool {
return true
}
func (j *JavaTestImport) InstallInTestcases() bool {
return true
}
func (j *TestHost) DepsMutator(ctx android.BottomUpMutatorContext) {
if len(j.testHostProperties.Data_native_bins) > 0 {
for _, target := range ctx.MultiTargets() {