Skip to content

Commit 8761c44

Browse files
ajsinclaircopybara-github
authored andcommitted
Mobile Install: Do not make applications debuggable if "-c opt" is used.
This aligns the logic with a normal application build. The idea here is to improve runtime performance of deployed applications. Setting debuggable=true in the manifest forces the app to be run in interpreted mode by ART. PiperOrigin-RevId: 854194444 Change-Id: Id7bd7207af493f8af1ab9ea6e6f62a8ab8d9b97b
1 parent 063b244 commit 8761c44

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mobile_install/apks.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414
"""Creates the apk(s)."""
1515

16-
load("//rules:utils.bzl", "get_android_sdk")
16+
load("//rules:utils.bzl", "compilation_mode", "get_android_sdk")
1717
load("//rules:visibility.bzl", "PROJECT_VISIBILITY")
1818
load(":utils.bzl", "utils")
1919

@@ -30,7 +30,7 @@ def _compile_android_manifest(ctx, manifest, resources_zip, out_manifest):
3030
args.add("-out", out_manifest)
3131
args.add("-sdk_jar", android_jar)
3232
args.add("-res", resources_zip)
33-
args.add("-force_debuggable=true")
33+
args.add("-force_debuggable", compilation_mode.get(ctx) != compilation_mode.OPT)
3434

3535
ctx.actions.run(
3636
executable = ctx.executable._android_kit,

0 commit comments

Comments
 (0)