diff options
| author | Jihoon Kang <jihoonkang@google.com> | 2023-05-25 21:09:40 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2023-05-25 21:09:40 +0000 |
| commit | de68c07ce5a3e36d8a13e30cd16fb3fc2c5cb2f7 (patch) | |
| tree | c3ea98a6a83beb475f30c294524767125c246a01 /java/java.go | |
| parent | 0cf043fd48cc6a4377baec34510ac2e846fd14cb (diff) | |
| parent | 160634ca3d9b9e23feccefea2ebfb64ed36f44d4 (diff) | |
Merge "Modify error emit condition for checking api files in java_api_library"
Diffstat (limited to 'java/java.go')
| -rw-r--r-- | java/java.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/java/java.go b/java/java.go index a23526aee..74c6c99c0 100644 --- a/java/java.go +++ b/java/java.go @@ -1813,7 +1813,7 @@ func (al *ApiLibrary) GenerateAndroidBuildActions(ctx android.ModuleContext) { case javaApiContributionTag: provider := ctx.OtherModuleProvider(dep, JavaApiImportProvider).(JavaApiImportInfo) providerApiFile := provider.ApiFile - if providerApiFile == nil { + if providerApiFile == nil && !ctx.Config().AllowMissingDependencies() { ctx.ModuleErrorf("Error: %s has an empty api file.", dep.Name()) } srcFiles = append(srcFiles, android.PathForSource(ctx, providerApiFile.String())) @@ -1835,7 +1835,7 @@ func (al *ApiLibrary) GenerateAndroidBuildActions(ctx android.ModuleContext) { srcFiles = append(srcFiles, android.PathForModuleSrc(ctx, api)) } - if srcFiles == nil { + if srcFiles == nil && !ctx.Config().AllowMissingDependencies() { ctx.ModuleErrorf("Error: %s has an empty api file.", ctx.ModuleName()) } |
