Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1b51142e authored by Jeff Gaston's avatar Jeff Gaston
Browse files

Replacing @Nullable with @RecentlyNullable for apis annotated since API 28

(temporarily). This causes Metalava to downgrade @Nullable/@NonNull to
@RecentlyNullable/@RecentlyNonNull for now.

This should provide more time to migrate calling code.

Note that we're still checking compatibility against API 29.

Test: m api-stubs-docs # and unzip out/target/common/docs/api-stubs-docs-stubs.srcjar \
      and notice that @Nullable/@NonNull are replaced by @RecentlyNullable/@RecentlyNonNull

Test: m checkapi

Test: echo "package samplePackage { public class sampleClass { } }" >> prebuilts/sdk/29/public/api/android.txt \
      && m checkapi # and notice that it correctly reports an error

Bug: 140127380
Change-Id: I616438183ef80d1da7cbbe1c0eb01d1f71eaad8c
parent 9bb86ea9
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -931,7 +931,7 @@ stubs_defaults {
        "sdk-dir",
        "api-versions-jars-dir",
    ],
    previous_api: ":last-released-public-api",
    previous_api: ":last-released-public-api-for-metalava-annotations",
    merge_annotations_dirs: [
        "metalava-manual",
        "ojluni-annotated-sdk-stubs",
@@ -988,7 +988,7 @@ stubs_defaults {
    local_sourcepaths: frameworks_base_subdirs,
    installable: false,
    annotations_enabled: true,
    previous_api: ":last-released-public-api",
    previous_api: ":last-released-public-api-for-metalava-annotations",
    merge_annotations_dirs: [
        "metalava-manual",
        "ojluni-annotated-sdk-stubs",
@@ -1324,7 +1324,7 @@ droidstubs {
    installable: false,
    sdk_version: "core_platform",
    annotations_enabled: true,
    previous_api: ":last-released-public-api",
    previous_api: ":last-released-public-api-for-metalava-annotations",
    merge_annotations_dirs: [
        "metalava-manual",
        "ojluni-annotated-sdk-stubs",