Merge "Include resources in sdk snapshot of java library impl" am: 29abfb7fd1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1348682 Change-Id: Id1a9545bfce9ed86cb2072bac58a8c410ca11c7c
This commit is contained in:
@@ -44,7 +44,7 @@ func init() {
|
|||||||
PropertyName: "java_libs",
|
PropertyName: "java_libs",
|
||||||
},
|
},
|
||||||
func(j *Library) android.Path {
|
func(j *Library) android.Path {
|
||||||
implementationJars := j.ImplementationJars()
|
implementationJars := j.ImplementationAndResourcesJars()
|
||||||
if len(implementationJars) != 1 {
|
if len(implementationJars) != 1 {
|
||||||
panic(fmt.Errorf("there must be only one implementation jar from %q", j.Name()))
|
panic(fmt.Errorf("there must be only one implementation jar from %q", j.Name()))
|
||||||
}
|
}
|
||||||
|
@@ -23,6 +23,7 @@ func testSdkWithJava(t *testing.T, bp string) *testSdkResult {
|
|||||||
|
|
||||||
fs := map[string][]byte{
|
fs := map[string][]byte{
|
||||||
"Test.java": nil,
|
"Test.java": nil,
|
||||||
|
"resource.test": nil,
|
||||||
"aidl/foo/bar/Test.aidl": nil,
|
"aidl/foo/bar/Test.aidl": nil,
|
||||||
|
|
||||||
// For java_sdk_library
|
// For java_sdk_library
|
||||||
@@ -348,6 +349,7 @@ func TestSnapshotWithJavaImplLibrary(t *testing.T) {
|
|||||||
java_library {
|
java_library {
|
||||||
name: "myjavalib",
|
name: "myjavalib",
|
||||||
srcs: ["Test.java"],
|
srcs: ["Test.java"],
|
||||||
|
java_resources: ["resource.txt"],
|
||||||
aidl: {
|
aidl: {
|
||||||
export_include_dirs: ["aidl"],
|
export_include_dirs: ["aidl"],
|
||||||
},
|
},
|
||||||
@@ -381,7 +383,7 @@ module_exports_snapshot {
|
|||||||
|
|
||||||
`),
|
`),
|
||||||
checkAllCopyRules(`
|
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
|
aidl/foo/bar/Test.aidl -> aidl/aidl/foo/bar/Test.aidl
|
||||||
`),
|
`),
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user