Skip to content

Commit fcf7fa9

Browse files
ahumeskycopybara-github
authored andcommitted
Fix android_application referencing unused bundle_keystore_properties.tmpl file.
Fixes #326 PiperOrigin-RevId: 806366660 Change-Id: I577401767420375a487fdf5143aec44fcf2a5049
1 parent 75b4d4e commit fcf7fa9

6 files changed

Lines changed: 40 additions & 6 deletions

File tree

.bazelci/presubmit.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ tasks:
158158
<<: *rules_flags
159159
build_targets:
160160
- "//java/com/basicapp:basic_app"
161+
- "//java/com/basicapp:basic_app_bundle"
161162
basicapp_bzlmod:
162163
name: "Basic app bzlmod"
163164
platform: ${{ platform }}
@@ -169,6 +170,7 @@ tasks:
169170
? "--enable_workspace=false"
170171
build_targets:
171172
- "//java/com/basicapp:basic_app"
173+
- "//java/com/basicapp:basic_app_bundle"
172174
windows_basicapp:
173175
name: "Basic app windows"
174176
platform: "windows"
@@ -178,6 +180,7 @@ tasks:
178180
<<: *rules_flags
179181
build_targets:
180182
- "//java/com/basicapp:basic_app"
183+
- "//java/com/basicapp:basic_app_bundle"
181184
windows_basicapp_bzlmod:
182185
name: "Basic app windows bzlmod"
183186
platform: "windows"
@@ -189,4 +192,5 @@ tasks:
189192
? "--enable_workspace=false"
190193
build_targets:
191194
- "//java/com/basicapp:basic_app"
195+
- "//java/com/basicapp:basic_app_bundle"
192196

examples/basicapp/java/com/basicapp/BUILD

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
load("@rules_android//android:rules.bzl", "android_binary", "android_library")
1+
load(
2+
"@rules_android//android:rules.bzl",
3+
"android_binary",
4+
"android_library",
5+
"android_application",
6+
)
27

38
android_binary(
49
name = "basic_app",
@@ -12,3 +17,15 @@ android_library(
1217
manifest = "AndroidManifest.xml",
1318
resource_files = glob(["res/**"]),
1419
)
20+
21+
android_application(
22+
name = "basic_app_bundle",
23+
# bundle_config_file or feature_modules must be specified to get an aab
24+
bundle_config_file = "bundle_config.pb.json",
25+
manifest = "AndroidManifest.xml",
26+
manifest_values = {
27+
"applicationId": "com.basicapp",
28+
"versionCode": "1",
29+
},
30+
deps = [":basic_lib"],
31+
)
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// https://github.com/google/bundletool/blob/master/src/main/proto/config.proto
2+
{
3+
"optimizations": {
4+
"splitsConfig": {
5+
"splitDimension": [
6+
{
7+
"value": "LANGUAGE"
8+
}
9+
]
10+
}
11+
}
12+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<string name="hello_world" translatable="false">¡Hola Mundo!</string>
4+
</resources>

kokoro/presubmit/presubmit_main.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,8 @@ function main() {
152152
"${COMMON_ARGS[@]}" \
153153
"${RULE_ARGS[@]}" \
154154
-- \
155-
//java/com/basicapp:basic_app
155+
//java/com/basicapp:basic_app \
156+
//java/com/basicapp:basic_app_bundle
156157

157158
# Mobile-install test with no deployment
158159
"$bazel" mobile-install \

rules/android_application/attrs.bzl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,6 @@ ANDROID_APPLICATION_ATTRS = _attrs.add(
7171
allow_single_file = True,
7272
default = ":bundle_deploy.sh_template",
7373
),
74-
_bundle_keystore_properties = attr.label(
75-
allow_single_file = True,
76-
default = "//rules:bundle_keystore_properties.tmpl",
77-
),
7874
_feature_manifest_script = attr.label(
7975
allow_single_file = True,
8076
cfg = "exec",

0 commit comments

Comments
 (0)