diff options
| author | 2020-05-05 15:42:53 +0000 | |
|---|---|---|
| committer | 2020-05-05 15:42:53 +0000 | |
| commit | a1910e8488b88c6f8c15d14cca335c6ff31ed13d (patch) | |
| tree | eebebe704d92921f179c704e13135ea955fd8a0b /java/sdk_library.go | |
| parent | d0666441b53616b8b95d9be404073029ef30cfcf (diff) | |
| parent | 6478ac17fc3b8dd8a075e4bd550afcf44a6e3580 (diff) | |
Merge "Disable "check last" for test api"
Diffstat (limited to 'java/sdk_library.go')
| -rw-r--r-- | java/sdk_library.go | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/java/sdk_library.go b/java/sdk_library.go index 9e3ad5bfa..d70f6320d 100644 --- a/java/sdk_library.go +++ b/java/sdk_library.go @@ -90,6 +90,9 @@ type apiScope struct { // Extra arguments to pass to droidstubs for this scope. droidstubsArgs []string + + // Whether the api scope can be treated as unstable, and should skip compat checks. + unstable bool } // Initialize a scope, creating and adding appropriate dependency tags @@ -142,6 +145,7 @@ var ( moduleSuffix: sdkTestApiSuffix, sdkVersion: "test_current", droidstubsArgs: []string{"-showAnnotation android.annotation.TestApi"}, + unstable: true, }) allApiScopes = apiScopes{ apiScopePublic, @@ -560,12 +564,14 @@ func (module *SdkLibrary) createStubsSources(mctx android.LoadHookContext, apiSc props.Check_api.Current.Api_file = proptools.StringPtr(currentApiFileName) props.Check_api.Current.Removed_api_file = proptools.StringPtr(removedApiFileName) - // check against the latest released API - props.Check_api.Last_released.Api_file = proptools.StringPtr( - module.latestApiFilegroupName(apiScope)) - props.Check_api.Last_released.Removed_api_file = proptools.StringPtr( - module.latestRemovedApiFilegroupName(apiScope)) - props.Check_api.Ignore_missing_latest_api = proptools.BoolPtr(true) + if !apiScope.unstable { + // check against the latest released API + props.Check_api.Last_released.Api_file = proptools.StringPtr( + module.latestApiFilegroupName(apiScope)) + props.Check_api.Last_released.Removed_api_file = proptools.StringPtr( + module.latestRemovedApiFilegroupName(apiScope)) + props.Check_api.Ignore_missing_latest_api = proptools.BoolPtr(true) + } // Dist the api txt artifact for sdk builds. if !Bool(module.sdkLibraryProperties.No_dist) { |