Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

UCB Set Gradle Version (not Unity Version)

Discussion in 'Unity Cloud Build' started by mog-mog-mog, Sep 10, 2018.

  1. mog-mog-mog

    mog-mog-mog

    Joined:
    Feb 12, 2014
    Posts:
    266
    Hello,

    I am using Unity 5.6.5 with my game. It comes bundled with Gradle Version 2.1
    My project have a requirement to use Gradle Version 4.0 or higher. I have manually upgraded the Gradle Tools under Unity/PlaybackEngine/Android/Tools/Gradle and project is building/working fine.

    But I am not able to build it on Cloud Build - as cloud build is using the default Gradle Version specified by Unity. Is there a way to force Gradle Version on Unity Cloud Build?
     
  2. mog-mog-mog

    mog-mog-mog

    Joined:
    Feb 12, 2014
    Posts:
    266
    Ping, any help will be appreciated?
     
  3. ollieblanks

    ollieblanks

    Unity Technologies

    Joined:
    Aug 21, 2017
    Posts:
    353
    Hey @lilboylost,

    There is not currently a way to modify the Unity installation on the build agents and therefore Gradle is also unable to be modified.

    My suggestion would be to upgrade your Project to a version of Unity that ships with the required Gradle version.

    I hope that helps!
     
  4. mog-mog-mog

    mog-mog-mog

    Joined:
    Feb 12, 2014
    Posts:
    266
    Thank you. Unity 5 - latest version 5.6.6 still has same gradle.
    If anything changes in future:
    • Cloud build support gradle version config
    • Unity 5 update support gradle 4 or higher

    then please post here !!!
     
    ollieblanks likes this.
  5. chriszul

    chriszul

    Joined:
    Feb 13, 2018
    Posts:
    33
    @ollieblanks, I'm having an issue with this too.

    > My suggestion would be to upgrade your Project to a version of Unity that ships with the required Gradle version.

    How do we know which versions of gradle ship with which versions of unity? Is it documented somewhere?
    I have a project which I need to use gradle due to dex errors with - and it builds locally ok with gradle, but on UCB it fails to include a jar file I need. I'm still digging but I'll try updating Unity to latest.
     
  6. ollieblanks

    ollieblanks

    Unity Technologies

    Joined:
    Aug 21, 2017
    Posts:
    353
    Gradle versions should be documented in the release notes, please see this post from @Yury-Habets for a list of most recent versions.

    Hope that helps!