Wish New option for CustomBuildActions

Discussion in 'Bugs & wishlist' started by Informatix, Jun 10, 2015.

  1. Informatix

    Informatix Expert Licensed User

    It seems there's still no mean to run Proguard on the B4A classes before they are converted to a dex file. A new option for CustomBuildActions would help.
    Proguard is interesting for its optimization feature.
     
    icefairy333 likes this.
  2. Erel

    Erel Administrator Staff Member Licensed User

    Have you tried to do it manually (to test it)? It will be difficult to use proguard with the generated code, unless you can disable its obfuscation features.
     
  3. Informatix

    Informatix Expert Licensed User

    The Proguard obfuscation feature is a feature among others. You can disable it (and it is not enabled by default).
    I never tried to run Proguard on the B4A class files because I cannot do anything with the result (Proguard cannot create a DEX or APK file; it "only" optimizes/obfuscates/shrinks your class files).
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    It will be added in the next update.
     
    Informatix likes this.
  5. Erel

    Erel Administrator Staff Member Licensed User

    You can try it with v5.01. It is action #6 (after the Java compilation step).
     
    Informatix likes this.
  6. Informatix

    Informatix Expert Licensed User

    Unfortunately I uninstalled the v5.01 before taking the time to try that but thank you for adding the feature.
     
  7. MarcoRome

    MarcoRome Expert Licensed User

    Very very good...
    One question, i have:

    1 - Before the compiler cleans the objects folder
    2 - Before R.java file is generated.
    3 - Before the package is signed
    4 - Before the APK is installed.
    5 - After the APK is installed.
    6 - After the Java compilation step

    So, example if i have my package name: com.xxxx.test

    i have in this path ....\Objects\bin\classes\com\xxxx\test ---> main.class
    Now if i want utilize proguard can i write so:
    Code:
    #CustomBuildAction: 6, java -jar proguard.jar,  -keep public class com.xxxx.text.main
    But Proguard dont wont also -injar and -outjar

    Any idea ???
     
  8. Informatix

    Informatix Expert Licensed User

    You have to provide a configuration file (*.pro) to proguard. Search in this forum. I posted an example.
     
    MarcoRome likes this.
Loading...