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

Commit 0935fa18 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Remove build rules for module-app API" am: e534a33c am: b37648b7 am: 5ffbe6f3

Change-Id: I499aac005559a80b3254c0d7e7a8b32d5ccc6382
parents f769e4c0 5ffbe6f3
Loading
Loading
Loading
Loading
+21 −83
Original line number Diff line number Diff line
@@ -113,6 +113,16 @@ droidstubs {
    jdiff_enabled: true,
}

priv_apps = " " +
    "--show-annotation android.annotation.SystemApi\\(" +
        "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" +
    "\\) "

module_libs = " " +
    " --show-annotation android.annotation.SystemApi\\(" +
        "client=android.annotation.SystemApi.Client.MODULE_LIBRARIES" +
    "\\) "

droidstubs {
    name: "system-api-stubs-docs",
    defaults: ["metalava-api-stubs-default"],
@@ -124,10 +134,7 @@ droidstubs {
    arg_files: [
        "core/res/AndroidManifest.xml",
    ],
    args: metalava_framework_docs_args +
        " --show-annotation android.annotation.SystemApi\\(" +
        "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS," +
        "process=android.annotation.SystemApi.Process.ALL\\)",
    args: metalava_framework_docs_args + priv_apps,
    check_api: {
        current: {
            api_file: "api/system-current.txt",
@@ -175,49 +182,17 @@ droidstubs {
// @SystemApi(client=MODULE_APPS) and @SystemApi(client=MODULE_LIBRARIES)
/////////////////////////////////////////////////////////////////////

// TODO(b/146727827) remove the *-api modules when we can teach metalava
// TODO(b/146727827) remove the *-api module when we can teach metalava
// about the relationship among the API surfaces. Currently, these modules are only to generate
// the API signature files and ensure that the APIs evolve in a backwards compatible manner.
// They however are NOT used for building the API stub.
droidstubs {
    name: "module-app-api",
    defaults: ["metalava-api-stubs-default"],
    libs: ["framework-all"],
    arg_files: ["core/res/AndroidManifest.xml"],
    args: metalava_framework_docs_args +
        " --show-annotation android.annotation.SystemApi\\(" +
        "client=android.annotation.SystemApi.Client.MODULE_APPS," +
        "process=android.annotation.SystemApi.Process.ALL\\)",
    check_api: {
        current: {
            api_file: "api/module-app-current.txt",
            removed_api_file: "api/module-app-removed.txt",
        },
        // TODO(b/147559833) enable the compatibility check against the last release API
        // and the API lint
        //last_released: {
        //    api_file: ":last-released-module-app-api",
        //    removed_api_file: "api/module-app-removed.txt",
        //    baseline_file: ":module-app-api-incompatibilities-with-last-released"
        //},
        //api_lint: {
        //    enabled: true,
        //    new_since: ":last-released-module-app-api",
        //    baseline_file: "api/module-app-lint-baseline.txt",
        //},
    },
    //jdiff_enabled: true,
}

droidstubs {
    name: "module-lib-api",
    defaults: ["metalava-api-stubs-default"],
    libs: ["framework-all"],
    arg_files: ["core/res/AndroidManifest.xml"],
    args: metalava_framework_docs_args +
        " --show-annotation android.annotation.SystemApi\\(" +
        "client=android.annotation.SystemApi.Client.MODULE_LIBRARIES," +
        "process=android.annotation.SystemApi.Process.ALL\\)",
    args: metalava_framework_docs_args + module_libs,
    check_api: {
        current: {
            api_file: "api/module-lib-current.txt",
@@ -239,39 +214,17 @@ droidstubs {
    //jdiff_enabled: true,
}

// The following two droidstubs modules generate source files for the API stub libraries for
// modules. Note that they not only include their own APIs but also other APIs that have
// narrower scope. For example, module-lib-api-stubs-docs includes all @SystemApis not just
// the ones with 'client=MODULE_LIBRARIES'.
droidstubs {
    name: "module-app-api-stubs-docs",
    defaults: ["metalava-api-stubs-default"],
    libs: ["framework-all"],
    arg_files: ["core/res/AndroidManifest.xml"],
    args: metalava_framework_docs_args +
        " --show-annotation android.annotation.SystemApi\\(" +
        "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS," +
        "process=android.annotation.SystemApi.Process.ALL\\)" +
        " --show-annotation android.annotation.SystemApi\\(" +
        "client=android.annotation.SystemApi.Client.MODULE_APPS," +
        "process=android.annotation.SystemApi.Process.ALL\\)",
}

// The following droidstub module generates source files for the API stub library for
// modules. Note that it not only includes its own APIs but also other APIs that have
// narrower scope (all @SystemApis, not just the ones with 'client=MODULE_LIBRARIES').

droidstubs {
    name: "module-lib-api-stubs-docs",
    defaults: ["metalava-api-stubs-default"],
    libs: ["framework-all"],
    arg_files: ["core/res/AndroidManifest.xml"],
    args: metalava_framework_docs_args +
        " --show-annotation android.annotation.SystemApi\\(" +
        "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS," +
        "process=android.annotation.SystemApi.Process.ALL\\)" +
        " --show-annotation android.annotation.SystemApi\\(" +
        "client=android.annotation.SystemApi.Client.MODULE_APPS," +
        "process=android.annotation.SystemApi.Process.ALL\\)" +
        " --show-annotation android.annotation.SystemApi\\(" +
        "client=android.annotation.SystemApi.Client.MODULE_LIBRARIES," +
        "process=android.annotation.SystemApi.Process.ALL\\)",
    args: metalava_framework_docs_args + priv_apps + module_libs,
}

/////////////////////////////////////////////////////////////////////
@@ -339,21 +292,6 @@ java_library_static {
    sdk_version: "core_current",
}

java_library_static {
    name: "android_module_app_stubs_current",
    srcs: [
        ":module-app-api-stubs-docs",
    ],
    libs: [
        "stub-annotations",
        "framework-all",
    ],
    static_libs: [
        "private-stub-annotations-jar",
    ],
    defaults: ["framework-stubs-default"],
}

java_library_static {
    name: "android_module_lib_stubs_current",
    srcs: [
@@ -401,7 +339,7 @@ droidstubs {
    merge_annotations_dirs: [
        "metalava-manual",
    ],
    args: " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS,process=android.annotation.SystemApi.Process.ALL\\)",
    args: priv_apps,
}

java_library_static {
@@ -427,7 +365,7 @@ droidstubs {
    removed_dex_api_filename: "removed-dex.txt",
    args: metalava_framework_docs_args +
        " --show-unannotated " +
        " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS,process=android.annotation.SystemApi.Process.ALL\\) " +
        priv_apps +
        " --show-annotation android.annotation.TestApi ",
}

@@ -446,7 +384,7 @@ droidstubs {
        " --hide ReferencesHidden " +
        " --hide UnhiddenSystemApi " +
        " --show-unannotated " +
        " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS,process=android.annotation.SystemApi.Process.ALL\\) " +
        priv_apps +
        " --show-annotation android.annotation.TestApi ",
}

api/module-app-current.txt

deleted100644 → 0
+0 −1
Original line number Diff line number Diff line
// Signature format: 2.0

api/module-app-removed.txt

deleted100644 → 0
+0 −1
Original line number Diff line number Diff line
// Signature format: 2.0