diff options
| author | Spandan Das <spandandas@google.com> | 2022-12-06 16:48:07 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2022-12-06 16:48:07 +0000 |
| commit | d53878e2f06e97e0370605676c840f5a5bbbce09 (patch) | |
| tree | 8ad64abffb658293d13c7902056a11c544274bc3 /java/java.go | |
| parent | 720e0ce5e2ecd012bb55d562c1cbe0928bf2199c (diff) | |
| parent | c082eb8eac3ce1ab54f728bc0f2584c88a93d4c9 (diff) | |
Merge changes I5b4e5570,I1de4b322
* changes:
Add an api_files property in java_api_library
Use relaxed check for prebuilt src
Diffstat (limited to 'java/java.go')
| -rw-r--r-- | java/java.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/java/java.go b/java/java.go index e37a77e46..9dd585062 100644 --- a/java/java.go +++ b/java/java.go @@ -1567,8 +1567,14 @@ type JavaApiLibraryProperties struct { Api_surface *string // list of Java API contribution modules that consists this API surface + // This is a list of Soong modules Api_contributions []string + // list of api.txt files relative to this directory that contribute to the + // API surface. + // This is a list of relative paths + Api_files []string + // List of flags to be passed to the javac compiler to generate jar file Javacflags []string } @@ -1665,6 +1671,13 @@ func (al *ApiLibrary) GenerateAndroidBuildActions(ctx android.ModuleContext) { srcFiles = append(srcFiles, android.PathForSource(ctx, provider.ApiFile.String())) }) + // Add the api_files inputs + for _, api := range al.properties.Api_files { + // Use MaybeExistentPathForSource since the api file might not exist during analysis. + // This will be provided by the orchestrator in the combined execution. + srcFiles = append(srcFiles, android.MaybeExistentPathForSource(ctx, ctx.ModuleDir(), api)) + } + cmd := metalavaStubCmd(ctx, rule, srcFiles, homeDir) al.stubsFlags(ctx, cmd, stubsDir) |
