diff options
| author | 2024-08-20 20:03:54 +0000 | |
|---|---|---|
| committer | 2024-08-20 20:03:54 +0000 | |
| commit | b4cc88efefb4bfd5a67a11527a9b59790dce8d0f (patch) | |
| tree | d25f325d2a6d265f724baa8752e23cf2821a8e6b /java/java.go | |
| parent | 800bde10217164d0b67641085f634da78875dc57 (diff) | |
| parent | 3dac486013cf4256f7ce1bc15e0aa43bbb2524fe (diff) | |
Merge "Only add deps on java_binary's jni_libs on host" into main
Diffstat (limited to 'java/java.go')
| -rw-r--r-- | java/java.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/java/java.go b/java/java.go index 258ebba0c..46344c842 100644 --- a/java/java.go +++ b/java/java.go @@ -1864,10 +1864,12 @@ func (j *Binary) DepsMutator(ctx android.BottomUpMutatorContext) { if ctx.Arch().ArchType == android.Common { j.deps(ctx) } - if ctx.Arch().ArchType != android.Common { - // These dependencies ensure the host installation rules will install the jar file and - // the jni libraries when the wrapper is installed. + // These dependencies ensure the installation rules will install the jar file when the + // wrapper is installed, and the jni libraries on host when the wrapper is installed. + if ctx.Arch().ArchType != android.Common && ctx.Os().Class == android.Host { ctx.AddVariationDependencies(nil, jniInstallTag, j.binaryProperties.Jni_libs...) + } + if ctx.Arch().ArchType != android.Common { ctx.AddVariationDependencies( []blueprint.Variation{{Mutator: "arch", Variation: android.CommonArch.String()}}, binaryInstallTag, ctx.ModuleName()) |