How do I upgrade Gradle?











up vote
26
down vote

favorite
3












This shows that Gradle is up to date:



thufir@doge:~$ sudo apt install gradle
Reading package lists... Done
Building dependency tree
Reading state information... Done
gradle is already the newest version (2.10-1).
0 upgraded, 0 newly installed, 0 to remove and 629 not upgraded.


How do I upgrade to Gradle 4.x? Preferably, with umake rather than SDKMAN! which seems to be what they suggest.



(I don't want to update all the packages due to a slow connection.)










share|improve this question




























    up vote
    26
    down vote

    favorite
    3












    This shows that Gradle is up to date:



    thufir@doge:~$ sudo apt install gradle
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    gradle is already the newest version (2.10-1).
    0 upgraded, 0 newly installed, 0 to remove and 629 not upgraded.


    How do I upgrade to Gradle 4.x? Preferably, with umake rather than SDKMAN! which seems to be what they suggest.



    (I don't want to update all the packages due to a slow connection.)










    share|improve this question


























      up vote
      26
      down vote

      favorite
      3









      up vote
      26
      down vote

      favorite
      3






      3





      This shows that Gradle is up to date:



      thufir@doge:~$ sudo apt install gradle
      Reading package lists... Done
      Building dependency tree
      Reading state information... Done
      gradle is already the newest version (2.10-1).
      0 upgraded, 0 newly installed, 0 to remove and 629 not upgraded.


      How do I upgrade to Gradle 4.x? Preferably, with umake rather than SDKMAN! which seems to be what they suggest.



      (I don't want to update all the packages due to a slow connection.)










      share|improve this question















      This shows that Gradle is up to date:



      thufir@doge:~$ sudo apt install gradle
      Reading package lists... Done
      Building dependency tree
      Reading state information... Done
      gradle is already the newest version (2.10-1).
      0 upgraded, 0 newly installed, 0 to remove and 629 not upgraded.


      How do I upgrade to Gradle 4.x? Preferably, with umake rather than SDKMAN! which seems to be what they suggest.



      (I don't want to update all the packages due to a slow connection.)







      apt upgrade versions ubuntu-make gradle






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 10 '17 at 11:54









      serv-inc

      1,4831420




      1,4831420










      asked Jul 5 '17 at 2:26









      Thufir

      1,48884391




      1,48884391






















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          43
          down vote



          accepted










          You could use the ppa:



          sudo add-apt-repository ppa:cwchien/gradle
          sudo apt-get update
          sudo apt upgrade gradle





          share|improve this answer





















          • I got error while running upgrade gradle as The following packages have unmet dependencies. powershell : Depends: liblttng-ust0 but it is not installed . I have to run this sudo apt-get -f install then sudo apt-get -f install gradle. This way, it deletes the previous one and installs the latest from scratch.
            – Anum Sheraz
            Jul 20 at 15:55












          • @AnumSheraz: powershell is in another repository altogether. It should not have anything to do with gradle. But it seems like sudo apt-get -f install fixed its problem.
            – serv-inc
            Jul 21 at 9:52






          • 1




            you're lifesaver. My gradle version was 2 and throws that exception: gradle failed to apply plugin id 'com.google.protobuf' After update gradle the problem is gone. Thanks.
            – kodmanyagha
            Oct 21 at 11:21


















          up vote
          2
          down vote













          You can also tell Gradle to update itself using a Gradle wrapper.



          First you create the wrapper, then tell it to use the Gradle version of your choice:



          gradle wrapper
          ./gradlew wrapper --gradle-version 4.9


          Now this project will use Gradle 4.9, independent of what's installed.
          However, you need to remember to run Gradle through the wrapper, i.e., run ./gradlew instead of plain gradle.



          The wrapper allows you to have different projects using different Gradle versions easily.



          When you commit the created wrapper to source control, everybody who checks out the project will use the same Gradle version. This can help a lot with incompatible build scripts, when something has changed between Gradle versions.






          share|improve this answer





















            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "89"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














             

            draft saved


            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f932083%2fhow-do-i-upgrade-gradle%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            43
            down vote



            accepted










            You could use the ppa:



            sudo add-apt-repository ppa:cwchien/gradle
            sudo apt-get update
            sudo apt upgrade gradle





            share|improve this answer





















            • I got error while running upgrade gradle as The following packages have unmet dependencies. powershell : Depends: liblttng-ust0 but it is not installed . I have to run this sudo apt-get -f install then sudo apt-get -f install gradle. This way, it deletes the previous one and installs the latest from scratch.
              – Anum Sheraz
              Jul 20 at 15:55












            • @AnumSheraz: powershell is in another repository altogether. It should not have anything to do with gradle. But it seems like sudo apt-get -f install fixed its problem.
              – serv-inc
              Jul 21 at 9:52






            • 1




              you're lifesaver. My gradle version was 2 and throws that exception: gradle failed to apply plugin id 'com.google.protobuf' After update gradle the problem is gone. Thanks.
              – kodmanyagha
              Oct 21 at 11:21















            up vote
            43
            down vote



            accepted










            You could use the ppa:



            sudo add-apt-repository ppa:cwchien/gradle
            sudo apt-get update
            sudo apt upgrade gradle





            share|improve this answer





















            • I got error while running upgrade gradle as The following packages have unmet dependencies. powershell : Depends: liblttng-ust0 but it is not installed . I have to run this sudo apt-get -f install then sudo apt-get -f install gradle. This way, it deletes the previous one and installs the latest from scratch.
              – Anum Sheraz
              Jul 20 at 15:55












            • @AnumSheraz: powershell is in another repository altogether. It should not have anything to do with gradle. But it seems like sudo apt-get -f install fixed its problem.
              – serv-inc
              Jul 21 at 9:52






            • 1




              you're lifesaver. My gradle version was 2 and throws that exception: gradle failed to apply plugin id 'com.google.protobuf' After update gradle the problem is gone. Thanks.
              – kodmanyagha
              Oct 21 at 11:21













            up vote
            43
            down vote



            accepted







            up vote
            43
            down vote



            accepted






            You could use the ppa:



            sudo add-apt-repository ppa:cwchien/gradle
            sudo apt-get update
            sudo apt upgrade gradle





            share|improve this answer












            You could use the ppa:



            sudo add-apt-repository ppa:cwchien/gradle
            sudo apt-get update
            sudo apt upgrade gradle






            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Nov 10 '17 at 11:10









            serv-inc

            1,4831420




            1,4831420












            • I got error while running upgrade gradle as The following packages have unmet dependencies. powershell : Depends: liblttng-ust0 but it is not installed . I have to run this sudo apt-get -f install then sudo apt-get -f install gradle. This way, it deletes the previous one and installs the latest from scratch.
              – Anum Sheraz
              Jul 20 at 15:55












            • @AnumSheraz: powershell is in another repository altogether. It should not have anything to do with gradle. But it seems like sudo apt-get -f install fixed its problem.
              – serv-inc
              Jul 21 at 9:52






            • 1




              you're lifesaver. My gradle version was 2 and throws that exception: gradle failed to apply plugin id 'com.google.protobuf' After update gradle the problem is gone. Thanks.
              – kodmanyagha
              Oct 21 at 11:21


















            • I got error while running upgrade gradle as The following packages have unmet dependencies. powershell : Depends: liblttng-ust0 but it is not installed . I have to run this sudo apt-get -f install then sudo apt-get -f install gradle. This way, it deletes the previous one and installs the latest from scratch.
              – Anum Sheraz
              Jul 20 at 15:55












            • @AnumSheraz: powershell is in another repository altogether. It should not have anything to do with gradle. But it seems like sudo apt-get -f install fixed its problem.
              – serv-inc
              Jul 21 at 9:52






            • 1




              you're lifesaver. My gradle version was 2 and throws that exception: gradle failed to apply plugin id 'com.google.protobuf' After update gradle the problem is gone. Thanks.
              – kodmanyagha
              Oct 21 at 11:21
















            I got error while running upgrade gradle as The following packages have unmet dependencies. powershell : Depends: liblttng-ust0 but it is not installed . I have to run this sudo apt-get -f install then sudo apt-get -f install gradle. This way, it deletes the previous one and installs the latest from scratch.
            – Anum Sheraz
            Jul 20 at 15:55






            I got error while running upgrade gradle as The following packages have unmet dependencies. powershell : Depends: liblttng-ust0 but it is not installed . I have to run this sudo apt-get -f install then sudo apt-get -f install gradle. This way, it deletes the previous one and installs the latest from scratch.
            – Anum Sheraz
            Jul 20 at 15:55














            @AnumSheraz: powershell is in another repository altogether. It should not have anything to do with gradle. But it seems like sudo apt-get -f install fixed its problem.
            – serv-inc
            Jul 21 at 9:52




            @AnumSheraz: powershell is in another repository altogether. It should not have anything to do with gradle. But it seems like sudo apt-get -f install fixed its problem.
            – serv-inc
            Jul 21 at 9:52




            1




            1




            you're lifesaver. My gradle version was 2 and throws that exception: gradle failed to apply plugin id 'com.google.protobuf' After update gradle the problem is gone. Thanks.
            – kodmanyagha
            Oct 21 at 11:21




            you're lifesaver. My gradle version was 2 and throws that exception: gradle failed to apply plugin id 'com.google.protobuf' After update gradle the problem is gone. Thanks.
            – kodmanyagha
            Oct 21 at 11:21












            up vote
            2
            down vote













            You can also tell Gradle to update itself using a Gradle wrapper.



            First you create the wrapper, then tell it to use the Gradle version of your choice:



            gradle wrapper
            ./gradlew wrapper --gradle-version 4.9


            Now this project will use Gradle 4.9, independent of what's installed.
            However, you need to remember to run Gradle through the wrapper, i.e., run ./gradlew instead of plain gradle.



            The wrapper allows you to have different projects using different Gradle versions easily.



            When you commit the created wrapper to source control, everybody who checks out the project will use the same Gradle version. This can help a lot with incompatible build scripts, when something has changed between Gradle versions.






            share|improve this answer

























              up vote
              2
              down vote













              You can also tell Gradle to update itself using a Gradle wrapper.



              First you create the wrapper, then tell it to use the Gradle version of your choice:



              gradle wrapper
              ./gradlew wrapper --gradle-version 4.9


              Now this project will use Gradle 4.9, independent of what's installed.
              However, you need to remember to run Gradle through the wrapper, i.e., run ./gradlew instead of plain gradle.



              The wrapper allows you to have different projects using different Gradle versions easily.



              When you commit the created wrapper to source control, everybody who checks out the project will use the same Gradle version. This can help a lot with incompatible build scripts, when something has changed between Gradle versions.






              share|improve this answer























                up vote
                2
                down vote










                up vote
                2
                down vote









                You can also tell Gradle to update itself using a Gradle wrapper.



                First you create the wrapper, then tell it to use the Gradle version of your choice:



                gradle wrapper
                ./gradlew wrapper --gradle-version 4.9


                Now this project will use Gradle 4.9, independent of what's installed.
                However, you need to remember to run Gradle through the wrapper, i.e., run ./gradlew instead of plain gradle.



                The wrapper allows you to have different projects using different Gradle versions easily.



                When you commit the created wrapper to source control, everybody who checks out the project will use the same Gradle version. This can help a lot with incompatible build scripts, when something has changed between Gradle versions.






                share|improve this answer












                You can also tell Gradle to update itself using a Gradle wrapper.



                First you create the wrapper, then tell it to use the Gradle version of your choice:



                gradle wrapper
                ./gradlew wrapper --gradle-version 4.9


                Now this project will use Gradle 4.9, independent of what's installed.
                However, you need to remember to run Gradle through the wrapper, i.e., run ./gradlew instead of plain gradle.



                The wrapper allows you to have different projects using different Gradle versions easily.



                When you commit the created wrapper to source control, everybody who checks out the project will use the same Gradle version. This can help a lot with incompatible build scripts, when something has changed between Gradle versions.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Aug 21 at 14:59









                Robert

                1607




                1607






























                     

                    draft saved


                    draft discarded



















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f932083%2fhow-do-i-upgrade-gradle%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Quarter-circle Tiles

                    build a pushdown automaton that recognizes the reverse language of a given pushdown automaton?

                    Mont Emei