[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
This commit is contained in:
Songchun Fan
2021-02-26 01:40:00 +00:00
parent 043304fc1d
commit e2c109d7e4
2 changed files with 47 additions and 56 deletions

View File

@@ -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"],
}
@@ -749,8 +749,8 @@ java_library {
}
platform_compat_config {
name: "framework-platform-compat-config",
src: ":framework-minus-apex",
name: "framework-platform-compat-config",
src: ":framework-minus-apex",
}
// A temporary build target that is conditionally included on the bootclasspath if
@@ -771,7 +771,7 @@ genrule {
name: "statslog-framework-java-gen",
tools: ["stats-log-api-gen"],
cmd: "$(location stats-log-api-gen) --java $(out) --module framework" +
" --javaPackage com.android.internal.util --javaClass FrameworkStatsLog --worksource",
" --javaPackage com.android.internal.util --javaClass FrameworkStatsLog --worksource",
out: ["com/android/internal/util/FrameworkStatsLog.java"],
}
@@ -880,7 +880,7 @@ filegroup {
java_library {
name: "framework-annotations-lib",
srcs: [ ":framework-annotations" ],
srcs: [":framework-annotations"],
sdk_version: "core_current",
}
@@ -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
@@ -1314,7 +1303,7 @@ java_library {
"core/java/android/os/RemoteException.java",
"core/java/android/util/AndroidException.java",
],
libs: [ "unsupportedappusage" ],
libs: ["unsupportedappusage"],
dxflags: ["--core-library"],
installable: false,
@@ -1533,4 +1522,5 @@ java_library {
":protolog-common-src",
],
}
// protolog end

View File

@@ -1,5 +1,6 @@
[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}