Remove comments from Release version.

3 posts, 0 answers
  1. Don
    Don avatar
    66 posts
    Member since:
    Jun 2012

    Posted 07 May 2014 Link to this post

    I am in the final testing phase for my app and decided to try distributing the app to testers (http://docs.telerik.com/platform/appbuilder/publishing-your-app/distributing-for-testing/distribute-for-testing-android#build-and-distribute-your-android-app-to-testers-from-the-appbuilder-windows-client).

    I assumed that when I set the Workspace Build Settings to "Release", it would compile a version of my code with all the comments removed.  However, after downloading the .apk and taking a look, I see that all my code comments are still there.  I'm assuming this is the same behavior that will occur when I publish a "Release" version to Google Play/iTunes.

    I definitely do not want my code comments out there.  I have different settings for development vs. production versions, and I have to do a lot of commenting/uncommenting when switching between the two.

    So my questions are:
    1)  Am I correct that code comments will be in the production distributions of my app even if I set to "Release"?
    2)  Assuming #1 is correct, is there something built in to AppBuilder to suppress comments?
    3)  Assuming the answer to #2 is "no", do you have any suggestions for dealing with this situation other than comment/uncomment manually?

  2. Zdravko
    Admin
    Zdravko avatar
    657 posts

    Posted 12 May 2014 Link to this post

    Hi Donald,

    Thanks for contacting us.
    I am not sure why you have such expectation as a result when build setting is set to Release. The page you have posted describes the only differences when the modes are changed.

    Unfortunately the only faster way to remove your comment will be our Find and Replace  (Ctrl + F) functionality. There is a Reg Expression option that will allow you to select the comments your want.
    Here you can find some ready for use.

    I hope this will help you achieve your goal faster.

    Regards,
    Zdravko
    Telerik
     

    Share what you think about AppBuilder and Telerik Platform with us in our feedback portal, so we can become even better!

     
  3. Kaloyan
    Admin
    Kaloyan avatar
    872 posts

    Posted 13 May 2014 Link to this post

    Hi Donald,

    Just a quick follow up on this. We already have an item in our Ideas and Feedback portal, about minifying all the JavaScript and CSS upon release builds. As this will also hide all of the comments in the code by design, I suggest you to up vote it.

    Have a nice day.

    Regards,
    Kaloyan
    Telerik
     

    Share what you think about AppBuilder and Telerik Platform with us in our feedback portal, so we can become even better!

     
Back to Top