Move java module installation into Soong am: 24cc4be60b
am: e2d3d87fcd
am: 865a62d8ca
am: 29c7bdd685
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1880650 Change-Id: I79a514d39a29b89f6783d059f38f333dc705ec73
This commit is contained in:
@@ -594,11 +594,17 @@ func (c *config) HostJNIToolPath(ctx PathContext, lib string) Path {
|
|||||||
|
|
||||||
func (c *config) HostJavaToolPath(ctx PathContext, tool string) Path {
|
func (c *config) HostJavaToolPath(ctx PathContext, tool string) Path {
|
||||||
path := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "framework", false, tool)
|
path := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "framework", false, tool)
|
||||||
|
if ctx.Config().KatiEnabled() {
|
||||||
|
path = path.ToMakePath()
|
||||||
|
}
|
||||||
return path
|
return path
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *config) HostJavaBinToolPath(ctx PathContext, tool string) Path {
|
func (c *config) HostJavaBinToolPath(ctx PathContext, tool string) Path {
|
||||||
path := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "bin", false, tool)
|
path := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "bin", false, tool)
|
||||||
|
if ctx.Config().KatiEnabled() {
|
||||||
|
path = path.ToMakePath()
|
||||||
|
}
|
||||||
return path
|
return path
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -285,11 +285,6 @@ func (binary *Binary) AndroidMkEntries() []android.AndroidMkEntries {
|
|||||||
}}
|
}}
|
||||||
} else {
|
} else {
|
||||||
outputFile := binary.wrapperFile
|
outputFile := binary.wrapperFile
|
||||||
// Have Make installation trigger Soong installation by using Soong's install path as
|
|
||||||
// the output file.
|
|
||||||
if binary.Host() {
|
|
||||||
outputFile = binary.binaryFile
|
|
||||||
}
|
|
||||||
|
|
||||||
return []android.AndroidMkEntries{android.AndroidMkEntries{
|
return []android.AndroidMkEntries{android.AndroidMkEntries{
|
||||||
Class: "EXECUTABLES",
|
Class: "EXECUTABLES",
|
||||||
|
@@ -108,6 +108,8 @@ func (a *AndroidAppImport) IsInstallable() bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (a *AndroidAppImport) InstallBypassMake() bool { return true }
|
||||||
|
|
||||||
// Updates properties with variant-specific values.
|
// Updates properties with variant-specific values.
|
||||||
func (a *AndroidAppImport) processVariants(ctx android.LoadHookContext) {
|
func (a *AndroidAppImport) processVariants(ctx android.LoadHookContext) {
|
||||||
config := ctx.Config()
|
config := ctx.Config()
|
||||||
|
16
java/java.go
16
java/java.go
@@ -265,6 +265,8 @@ func (j *Module) XrefJavaFiles() android.Paths {
|
|||||||
return j.kytheFiles
|
return j.kytheFiles
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (j *Module) InstallBypassMake() bool { return true }
|
||||||
|
|
||||||
type dependencyTag struct {
|
type dependencyTag struct {
|
||||||
blueprint.BaseDependencyTag
|
blueprint.BaseDependencyTag
|
||||||
name string
|
name string
|
||||||
@@ -856,6 +858,20 @@ type JavaTestImport struct {
|
|||||||
dexJarFile android.Path
|
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) {
|
func (j *TestHost) DepsMutator(ctx android.BottomUpMutatorContext) {
|
||||||
if len(j.testHostProperties.Data_native_bins) > 0 {
|
if len(j.testHostProperties.Data_native_bins) > 0 {
|
||||||
for _, target := range ctx.MultiTargets() {
|
for _, target := range ctx.MultiTargets() {
|
||||||
|
Reference in New Issue
Block a user