Search Unity

offline installation of Gradle 3.4.0 ???

Discussion in 'Android' started by Davood_Kharmanzar, Sep 15, 2019.

  1. Davood_Kharmanzar

    Davood_Kharmanzar

    Joined:
    Sep 20, 2017
    Posts:
    411
    hello,
    is it possible to install Gradle 3.4.0 as offline to building Android project without using internet connection for unity 2019.x??

    this is gradle-3.4.0.jar
     
  2. Davood_Kharmanzar

    Davood_Kharmanzar

    Joined:
    Sep 20, 2017
    Posts:
    411
    or is it possible to building project [.apk] without using Gradle on 2019.x?? [i mean disabling gradle or do with something as like as internal method of 2018.x]
     
  3. MechEthan

    MechEthan

    Joined:
    Mar 23, 2016
    Posts:
    166
    Unity has a local Gradle install when you add Android Build support.

    An example default install location on macOS using Unity Hub is:
    /Applications/Unity/Hub/Editor/2018.4.8f1/PlaybackEngines/AndroidPlayer/Tools/gradle


    When you build in the Unity Editor, it uses this by default.

    However, to be clear: Gradle is designed to download missing dependencies at build time, so if Gradle is failing offline, one of your plugins or packages may be declaring a dependency in its own build.gradle file. (I believe Gradle keeps these dependencies cached locally after first download, by default, however, so an offline build after 1 successful online build should work.)
     
    Last edited: Sep 18, 2019
  4. Davood_Kharmanzar

    Davood_Kharmanzar

    Joined:
    Sep 20, 2017
    Posts:
    411
    yup ... this is main gradle 5.1.1 and its working ...
    but i mean gradle 3.4.0 for android and dependencies that needs on gradle building...
     
  5. MechEthan

    MechEthan

    Joined:
    Mar 23, 2016
    Posts:
    166
  6. Davood_Kharmanzar

    Davood_Kharmanzar

    Joined:
    Sep 20, 2017
    Posts:
    411
    thanks for your response :]

    but i'm using an stupid method to building APK on 2019.x series!!
    1st) exporting an android project :)
    2nd) opening it on Android Studio and syncing Gradles :(
    3rd) and then building APK ... stuuuuuuuuuupid method :|

    why internal builder was removed on 2019.x series?!?!
    i hate Gradle ... hate hate hate ....
     
    COBO1990 and hojjat-reyhane like this.