diff options
| author | 2021-12-06 13:35:11 -0800 | |
|---|---|---|
| committer | 2022-01-10 14:01:12 -0800 | |
| commit | 21f7ae0828a1c3135d4d5d5076e497f46c07d39b (patch) | |
| tree | 488e52f5bb2234854e5bafe3174c26488f54ad64 /java/sdk_library_test.go | |
| parent | 183417a0ad06fef63d01da7a1cd4efb0a373edd6 (diff) | |
Add new property "exclude_files_in_output" for excluding files from the output files of Java related modules.
Bug: 204888276
Test: m service-permission
Change-Id: I9f6113834826358b0e3af22ed1dd63a43c255452
Diffstat (limited to 'java/sdk_library_test.go')
| -rw-r--r-- | java/sdk_library_test.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/java/sdk_library_test.go b/java/sdk_library_test.go index e60ca003e..edb7a48e5 100644 --- a/java/sdk_library_test.go +++ b/java/sdk_library_test.go @@ -48,6 +48,7 @@ func TestJavaSdkLibrary(t *testing.T) { name: "bar", srcs: ["a.java", "b.java"], api_packages: ["bar"], + exclude_kotlinc_generated_files: false, } java_library { name: "baz", @@ -161,6 +162,14 @@ func TestJavaSdkLibrary(t *testing.T) { android.AssertDeepEquals(t, "qux exports (required)", []string{"fred", "quuz", "foo", "bar"}, requiredSdkLibs) android.AssertDeepEquals(t, "qux exports (optional)", []string{}, optionalSdkLibs) } + + fooDexJar := result.ModuleForTests("foo", "android_common").Rule("d8") + // tests if kotlinc generated files are excluded from output of foo. + android.AssertStringDoesContain(t, "foo dex", fooDexJar.BuildParams.Args["mergeZipsFlags"], "-stripFile META-INF/*.kotlin_module") + + barDexJar := result.ModuleForTests("bar", "android_common").Rule("d8") + // tests if kotlinc generated files are NOT excluded from output of bar. + android.AssertStringDoesNotContain(t, "bar dex", barDexJar.BuildParams.Args["mergeZipsFlags"], "-stripFile META-INF/*.kotlin_module") } func TestJavaSdkLibrary_UpdatableLibrary(t *testing.T) { |