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

Commit e2c109d7 authored by Songchun Fan's avatar Songchun Fan
Browse files

[incremental] change build rules to not to use aidl_interface

This will allow the usage of PersistableBundle in the aidl interfaces.
The modules do not need to be stable so it is okay to just use the old
aidl to build both c++ and Java backend.

+ use bpfmt to check Android.bp format before upload

BUG: 181266844
Test: builds (with aosp/1607482)
Change-Id: I3340129ae6d12f33ade38d7a2b0eb23e7c37e996
parent 043304fc
Loading
Loading
Loading
Loading
+45 −55
Original line number Diff line number Diff line
@@ -344,8 +344,8 @@ filegroup {
genrule {
    name: "statslog-telephony-common-java-gen",
    tools: ["stats-log-api-gen"],
    cmd: "$(location stats-log-api-gen) --java $(out) --module telephony_common"
        + " --javaPackage com.android.internal.telephony --javaClass TelephonyCommonStatsLog",
    cmd: "$(location stats-log-api-gen) --java $(out) --module telephony_common" +
        " --javaPackage com.android.internal.telephony --javaClass TelephonyCommonStatsLog",
    out: ["com/android/internal/telephony/TelephonyCommonStatsLog.java"],
}

@@ -1158,7 +1158,6 @@ cc_library {
    },
}


// This is the full proto version of libplatformprotos. It may only
// be used by test code that is not shipped on the device.
cc_library {
@@ -1224,68 +1223,58 @@ filegroup {
    path: "core/java",
}

aidl_interface {
    name: "libincremental_aidl",
    unstable: true,
cc_defaults {
    name: "incremental_default",
    host_supported: true,
    cflags: [
        "-Wall",
        "-Wextra",
        "-Wextra-semi",
        "-Werror",
        "-Wzero-as-null-pointer-constant",
        "-DANDROID_BASE_UNIQUE_FD_DISABLE_IMPLICIT_CONVERSION",
    ],
    shared_libs: [
        "libbinder",
        "libutils",
    ],
    aidl: {
        include_dirs: [
            "frameworks/native/aidl/binder",
        ],
        export_aidl_headers: true,
    },
}

cc_library {
    name: "libincremental_aidl-cpp",
    srcs: [
        ":incremental_aidl",
    ],
    backend: {
        java: {
            sdk_version: "28",
        },
        cpp: {
            enabled: true,
        },
        ndk: {
            enabled: true,
        },
    },
    defaults: ["incremental_default"],
}

aidl_interface {
    name: "libdataloader_aidl",
    unstable: true,
cc_library {
    name: "libdataloader_aidl-cpp",
    srcs: [
        ":dataloader_aidl",
    ],
    imports: [
        "libincremental_aidl",
    defaults: ["incremental_default"],
    shared_libs: [
        "libincremental_aidl-cpp",
    ],
    backend: {
        java: {
            sdk_version: "28",
        },
        cpp: {
            enabled: true,
        },
        ndk: {
            enabled: false,
        },
    },
}

aidl_interface {
    name: "libincremental_manager_aidl",
    unstable: true,
cc_library {
    name: "libincremental_manager_aidl-cpp",
    srcs: [
        ":incremental_manager_aidl",
    ],
    imports: [
        "libincremental_aidl",
        "libdataloader_aidl",
    defaults: ["incremental_default"],
    shared_libs: [
        "libincremental_aidl-cpp",
        "libdataloader_aidl-cpp",
    ],
    backend: {
        java: {
            sdk_version: "28",
        },
        cpp: {
            enabled: true,
        },
        ndk: {
            enabled: false,
        },
    },
}

// TODO(b/77285514): remove this once the last few hidl interfaces have been
@@ -1533,4 +1522,5 @@ java_library {
        ":protolog-common-src",
    ],
}

// protolog end
+2 −1
Original line number Diff line number Diff line
[Builtin Hooks]
clang_format = true
bpfmt = true

[Builtin Hooks Options]
# Only turn on clang-format check for the following subfolders.
@@ -15,7 +16,7 @@ clang_format = --commit ${PREUPLOAD_COMMIT} --style file --extensions c,h,cc,cpp
               services/incremental/
               tests/
               tools/

bpfmt = -d
[Hook Scripts]
checkstyle_hook = ${REPO_ROOT}/prebuilts/checkstyle/checkstyle.py --sha ${PREUPLOAD_COMMIT}