diff options
| author | 2023-07-18 18:26:36 +0000 | |
|---|---|---|
| committer | 2023-07-18 18:26:36 +0000 | |
| commit | ef5d8278be8246ca655e75d5476c9ebb08d744d4 (patch) | |
| tree | be1e0d1b0afe20a6d7eaf703493e1d2de90ace80 /java/java_test.go | |
| parent | 66ef2ff97f9f6a5fb26de50419cddbfb658530ef (diff) | |
| parent | 1bfb6f231ea98d9ec59a759cf5bb85b250133bc1 (diff) | |
Merge "Fix stem to be propagated to output jar name in java_library" into main
Diffstat (limited to 'java/java_test.go')
| -rw-r--r-- | java/java_test.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/java/java_test.go b/java/java_test.go index 473830464..dd9867704 100644 --- a/java/java_test.go +++ b/java/java_test.go @@ -2351,3 +2351,22 @@ func TestJavaExcludeStaticLib(t *testing.T) { `stable.core.platform.api.stubs`, }) } + +func TestJavaLibraryWithResourcesStem(t *testing.T) { + ctx, _ := testJavaWithFS(t, ` + java_library { + name: "foo", + java_resource_dirs: ["test-jar"], + stem: "test", + } + `, + map[string][]byte{ + "test-jar/test/resource.txt": nil, + }) + + m := ctx.ModuleForTests("foo", "android_common") + outputs := fmt.Sprint(m.AllOutputs()) + if !strings.Contains(outputs, "test.jar") { + t.Errorf("Module output does not contain expected jar %s", "test.jar") + } +} |