diff options
author | 2023-05-17 00:23:38 +0000 | |
---|---|---|
committer | 2023-05-17 01:02:19 +0000 | |
commit | 795319fadb84b4e65c9fb3defbaf25b612acd53b (patch) | |
tree | 9ed915c5e2230230ee6e274a0edc1e6938ea418f /java/testing.go | |
parent | 7754be760a6f29cd25e8486ab5373b37c9c474a2 (diff) |
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
Diffstat (limited to 'java/testing.go')
-rw-r--r-- | java/testing.go | 7 |
1 files changed, 6 insertions, 1 deletions
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, |