From 795319fadb84b4e65c9fb3defbaf25b612acd53b Mon Sep 17 00:00:00 2001 From: Jihoon Kang Date: Wed, 17 May 2023 00:23:38 +0000 Subject: Disallow missing api source files for java_api_library module The purpose of this change is to enable filegroups to be taken as inputs for `java_api_library` module `api_files` property. However, since android.MaybeExistentPathForSource() does not support this, it needs to be replaced with android.PathForModuleSrc(), which checks for the files' existence. Bug: 283006953 Test: go test ./java Change-Id: I8a7d7f200f900219cc17243194a4c26071329ee6 --- java/testing.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'java/testing.go') diff --git a/java/testing.go b/java/testing.go index 6671bf0c7..ffc3a086f 100644 --- a/java/testing.go +++ b/java/testing.go @@ -71,7 +71,12 @@ var prepareForTestWithFrameworkDeps = android.GroupFixturePreparers( // Needed for framework defaultJavaDir + "/framework/aidl": nil, // Needed for various deps defined in GatherRequiredDepsForTest() - defaultJavaDir + "/a.java": nil, + defaultJavaDir + "/a.java": nil, + defaultJavaDir + "/api/current.txt": nil, + defaultJavaDir + "/api/system-current.txt": nil, + defaultJavaDir + "/api/test-current.txt": nil, + defaultJavaDir + "/api/module-lib-current.txt": nil, + defaultJavaDir + "/api/system-server-current.txt": nil, // Needed for R8 rules on apps "build/make/core/proguard.flags": nil, -- cgit v1.2.3-59-g8ed1b