File tree Expand file tree Collapse file tree
examples/basicapp/java/com/basicapp
rules/android_application Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 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
38android_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+ )
Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" utf-8" ?>
2+ <resources >
3+ <string name =" hello_world" translatable =" false" >¡Hola Mundo!</string >
4+ </resources >
Original file line number Diff line number Diff 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 \
Original file line number Diff line number Diff 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" ,
You can’t perform that action at this time.
0 commit comments