Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d11c1c8f authored by Paul Duffin's avatar Paul Duffin Committed by Automerger Merge Worker
Browse files

Merge "Copy implementation and header jars to make when possible" am: 94b2e705

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1740074

Change-Id: I5faab59bcde87b6be2e1b21ec9e85bdd75a5f687
parents eaae5064 94b2e705
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -231,8 +231,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")
				},