Enable Kotlin for Settings App

Currently Kotlin files cannot build with library app-compat-annotations.

Only one @ChangeId need this library, create separate build target
library Settings-change-ids to solve this issue.

After this cl, Kotlin could be used for Settings App.

Fix: 229037247
Test: make Settings
Change-Id: I4a0d99425c9e6cc2cbc015d2561daa68609ca0fd
This commit is contained in:
Chaohui Wang
2022-05-30 01:01:55 +08:00
parent 8720510d2d
commit 9ec6f0e41a
3 changed files with 48 additions and 15 deletions

View File

@@ -35,6 +35,15 @@ java_library {
],
}
java_library {
name: "Settings-change-ids",
srcs: ["src/com/android/settings/ChangeIds.java"],
libs: [
"app-compat-annotations",
],
}
// Build the Settings APK
android_library {
name: "Settings-core",
@@ -77,18 +86,18 @@ android_library {
"lottie",
"WifiTrackerLib",
"SettingsLibActivityEmbedding",
"Settings-change-ids",
],
libs: [
"telephony-common",
"ims-common",
"app-compat-annotations",
],
}
platform_compat_config {
name: "settings-platform-compat-config",
src: ":Settings-core",
src: ":Settings-change-ids",
system_ext_specific: true,
}
@@ -126,7 +135,7 @@ filegroup {
// over all the sources together.
filegroup {
name: "Settings_srcs",
srcs: ["src/**/*.java"],
srcs: ["src/**/*.java", "src/**/*.kt"],
}
filegroup {