diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-07-07 05:13:32 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-07-07 05:13:32 +0000 |
commit | 3bd5f97e0df2738c2d7ccef25445a7588dac4870 (patch) | |
tree | 95cf4a3e5b2c223ac65c353250d65a2badd3a4a6 | |
parent | 73c5a3381294c67d105949c5e623a9028f9d908c (diff) | |
parent | 0419b9f2da9a9f813e151256d2f365e19daa5788 (diff) | |
download | Music-3bd5f97e0df2738c2d7ccef25445a7588dac4870.tar.gz |
Snap for 10453563 from 0419b9f2da9a9f813e151256d2f365e19daa5788 to mainline-permission-releaseaml_per_341614000aml_per_341510010aml_per_341410020aml_per_341311000aml_per_341110020aml_per_341110010aml_per_341011100aml_per_341011020aml_per_340916010android14-mainline-permission-release
Change-Id: I16d0cdfa5c96e537c6529d4a4ee558f049f32729
-rw-r--r-- | BUILD | 8 | ||||
-rw-r--r-- | kotlin/BUILD | 33 |
2 files changed, 9 insertions, 32 deletions
@@ -1,9 +1,13 @@ -load("@rules_android//rules:rules.bzl", "android_binary", "android_library") +load("//build/bazel/rules/android:rules.bzl", "android_binary") android_binary( name = "Music", srcs = glob(["src/**/*.java"]), custom_package = "com.android.music", manifest = "AndroidManifest.xml", - deps = ["//packages/apps/Music/kotlin:MusicResources"], + # TODO(b/179889880): this manual BUILD file exists because these resources, + # if listed as files, would cross package boundary. + resource_files = ["//packages/apps/Music/kotlin:MusicResourceFiles"], + sdk_version = "current", + target_compatible_with = ["//build/bazel/platforms/os:android"], ) diff --git a/kotlin/BUILD b/kotlin/BUILD index ab0691c..40c96d3 100644 --- a/kotlin/BUILD +++ b/kotlin/BUILD @@ -1,31 +1,4 @@ -load("@rules_android//rules:rules.bzl", "android_binary", "android_library") - -# Placeholder manifest is required to build the android library below. -genrule( - name = "gen_placeholdermanifest", - outs = ["AndroidManifest.xml"], - cmd = """ -echo '<manifest xmlns:android="http://schemas.android.com/apk/res/android" - package="com.android.Music" - android:versionCode="1" - android:versionName="1.0" > - - <uses-sdk - android:minSdkVersion="21" - android:targetSdkVersion="21" /> -</manifest> - -' > $@""", -) - -# Workaround a bug where including resources at the top-level android_binary fails, -# it seems due to the resource folder being nested. Instead, we create this -# library to hold the resources and make the android_binary target depend on it. -android_library( - name = "MusicResources", - srcs = [], - custom_package = "com.android.music", - manifest = "AndroidManifest.xml", - resource_files = glob(["res/**"]), - visibility = ["//visibility:public"], +filegroup( + name = "MusicResourceFiles", + srcs = glob(["res/**"]), ) |