Merge "Copy implementation and header jars to make when possible" am: 94b2e705d1
am: d11c1c8fa4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1740074 Change-Id: I83a02203cbebd6dff91a06a7969615fbdfd01390
This commit is contained in:
commit
33ddfdf42b
1 changed files with 11 additions and 2 deletions
|
@ -230,8 +230,17 @@ func (p *prebuiltCommon) AndroidMkEntries() []android.AndroidMkEntries {
|
|||
// we need to remove the suffix from LOCAL_MODULE_STEM, otherwise
|
||||
// we will have foo.jar.jar
|
||||
entries.SetString("LOCAL_MODULE_STEM", strings.TrimSuffix(fi.stem(), ".jar"))
|
||||
entries.SetString("LOCAL_SOONG_CLASSES_JAR", fi.builtFile.String())
|
||||
entries.SetString("LOCAL_SOONG_HEADER_JAR", fi.builtFile.String())
|
||||
var classesJar android.Path
|
||||
var headerJar android.Path
|
||||
if javaModule, ok := fi.module.(java.ApexDependency); ok {
|
||||
classesJar = javaModule.ImplementationAndResourcesJars()[0]
|
||||
headerJar = javaModule.HeaderJars()[0]
|
||||
} else {
|
||||
classesJar = fi.builtFile
|
||||
headerJar = fi.builtFile
|
||||
}
|
||||
entries.SetString("LOCAL_SOONG_CLASSES_JAR", classesJar.String())
|
||||
entries.SetString("LOCAL_SOONG_HEADER_JAR", headerJar.String())
|
||||
entries.SetString("LOCAL_SOONG_DEX_JAR", fi.builtFile.String())
|
||||
entries.SetString("LOCAL_DEX_PREOPT", "false")
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue