Merge "Include resources in sdk snapshot of java library impl" am: 29abfb7fd1 am: 742dfaa142

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

Change-Id: I02456391e111a91721aa04be044f41f59e7d3183
This commit is contained in:
Treehugger Robot 2020-06-24 14:46:26 +00:00 committed by Automerger Merge Worker
commit cdc27099b4
2 changed files with 4 additions and 2 deletions

View File

@ -44,7 +44,7 @@ func init() {
PropertyName: "java_libs",
},
func(j *Library) android.Path {
implementationJars := j.ImplementationJars()
implementationJars := j.ImplementationAndResourcesJars()
if len(implementationJars) != 1 {
panic(fmt.Errorf("there must be only one implementation jar from %q", j.Name()))
}

View File

@ -23,6 +23,7 @@ func testSdkWithJava(t *testing.T, bp string) *testSdkResult {
fs := map[string][]byte{
"Test.java": nil,
"resource.test": nil,
"aidl/foo/bar/Test.aidl": nil,
// For java_sdk_library
@ -348,6 +349,7 @@ func TestSnapshotWithJavaImplLibrary(t *testing.T) {
java_library {
name: "myjavalib",
srcs: ["Test.java"],
java_resources: ["resource.txt"],
aidl: {
export_include_dirs: ["aidl"],
},
@ -381,7 +383,7 @@ module_exports_snapshot {
`),
checkAllCopyRules(`
.intermediates/myjavalib/android_common/javac/myjavalib.jar -> java/myjavalib.jar
.intermediates/myjavalib/android_common/withres/myjavalib.jar -> java/myjavalib.jar
aidl/foo/bar/Test.aidl -> aidl/aidl/foo/bar/Test.aidl
`),
)