You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @ansarizafar,
We have provided an <app_name>/app/App_Resources/Android/app.gradle file, for the purpose of changing the native configuration of a NativeScript project. You can enable proguard just as described in the official documentation, but there is a reason we haven't enabled it by default:
Most of the optimizations of proguard come from the fact it excludes classes, it sees as unnecessary and renames methods and classes.
Because of the nature of NativeScript, currently we need to call and create classes and call methods at runtime, and to do that we use their full qualified names. There is a way to customize proguard to keep certain classes (look under Customize which code to keep in the docs)
Having said that, I managed to make a working example of the hello world application and the final results were:
no proguard / debug (13.1 mb)
with proguard enabled / debug (12.7 mb)
This result is understandable, because nativescript doesn't contain a lot of java code to begin with.
Warning: Exception while processing task java.io.FileNotFoundException: D:\sourc
ecode\fc\NativeScript\platforms\android\build\intermediates\proguard-rules\F0F
1F2F3F4F5F6F7F8F9F10F11F12F13F14F15\release\aapt_rules.txt (The system cannot fi
nd the path specified)
:transformClassesAndResourcesWithProguardForF0F1F2F3F4F5F6F7F8F9F10F11F12F13F14F
15Release FAILED
From @ansarizafar on September 21, 2016 13:7
It seems that current build setup for android is not using Proguard. Please enableProguardInReleaseBuilds for release build to shrink the size of APK.
Copied from original issue: NativeScript/NativeScript#2782
The text was updated successfully, but these errors were encountered: