Search Unity

  1. Unity 2019.4 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  3. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

[User Proguard File] option with Cloud Build

Discussion in 'Unity Cloud Build' started by kyou_unity, Jun 11, 2019.

  1. kyou_unity

    kyou_unity

    Joined:
    May 7, 2019
    Posts:
    4
    Hello,
    I have a question about User Proguard File option when I try to build a Unity project for Android.
    When I start build from Unity > File > BuildSetting > Build with

    upload_2019-6-11_15-53-38.png
    It works fine.
    But when I try to build from BuildPipeline/Cloud Build I found that I can't set for Use Proguard File.
    There is a way to set BuildSystem and Minify by

    EditorUserBuildSettings.androidBuildSystem = AndroidBuildSystem.Gradle;
    EditorUserBuildSettings.androidReleaseMinification = AndroidMinification.Proguard;

    but it seems not enough and cause a build error.
    This opitions are not saved by any settings.asset either.

    How can I build from BuildPipeline or Cloud Build with my own proguard file?

    Thank you
     
    TheChosenBlob likes this.
  2. tayl0r

    tayl0r

    Joined:
    Jan 6, 2012
    Posts:
    81
  3. tayl0r

    tayl0r

    Joined:
    Jan 6, 2012
    Posts:
    81
    Supposedly this box gets ticked automatically if you have the proguard-user.txt file in the default path (Assets/Plugins/Android/). That seems to be working for us.
     
  4. kyou_unity

    kyou_unity

    Joined:
    May 7, 2019
    Posts:
    4
    Yes, just as you said,「Custom Gradle Template」and 「User Proguard File」will be on automatically when Unity detected mainTemplate.gradle and proguard-user.txt file
     
unityunity