NativeScript / NativeScript/android

cant disable multidex

Open
#1,681 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
563
Forks
144
Avg merge
10h 46m
Merged PRs (30d)
14

Description

because of that line https://github.com/NativeScript/android-runtime/blob/master/build-artifacts/project-template-gradle/app/src/main/java/com/tns/NativeScriptApplication.java#L32 a user cant decide to disable multidex if possible (would make app smaller).
The reason is that without multidex enabled that line would not compile. I tried a few things but it is a bit tricky to do preprocessor through gradle 7.0 (plugins not working anymore).
The idea would be to use a preprocessor to get rid of the line at compilation if multidex is disabled

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with build-artifacts/project-template-gradle/app/src/main/java/com/tns/NativeScriptApplication.java at line 32 and inspect how the Gradle 7.0 project template enables multidex. Determine how the line can be excluded when multidex is disabled, then verify that both multidex-enabled and disabled configurations compile and that the disabled configuration produces a smaller app.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
build-system, mobile
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.