Come fare il downgrade di gradle su mac

ALTRO, SOLUZIONI

Non c’è che dire avere una versione sbagliata di gradle può diventare un grave problema, ma soprattutto installare l’ultima versione e scoprire che non funziona più nulla e non sapere come fare il downgrade è ancora peggio. Visto che mi è successo ed ho impiegato un bel pò di ore per risolvere il problema, ho deciso di fare questo post con la speranza che possa esservi utile e non farvi perdere ulteriore tempo.

Bene, detto ciò la prima cosa da fare e quella di rimuovere il riferimento al gradle installato lanciando il seguente comando:

brew unlink gradle

Dopo di che sarà sufficiente lanciare il comando di installazione sostituendo <COMMIT> con il corrispondente id della versione di interesse

brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/<COMMIT>/Formula/gradle.rb

E’ possibile verificare tutti i commit sul link: https://gist.github.com/dimshik100/af28c2146651cae9aa9df94b7144f060, ma per comodità lascio la lista di seguito:

commit ea4695527b2eaea75f9f7e922f3cc31017018b78

gradle 6.5.1 (#57162)

commit 249a0cfe131b1642ab2fd5f289fe4f0954aba15e

gradle 6.5

commit f55f762247324d3920fd9c5fca8a6661fac26a97

gradle 6.4.1 (#54744)

commit 317b27f86273ad232a54412371f4a4dd8a1900fb

gradle 6.4 (#54299)

commit a815f807a32517eed2d1434f6236445e1426c7ce

gradle 6.3 (#52094)

commit 06c5694c564d6dd59a670fe34b33a0e642ac6c27

gradle: shorten long lines.

commit 5fd374b706a7949f13fc20c654764c2ac5986e42

gradle 6.2.2 (#51101)

commit 6b23ac12bb50c132030dd0630da1ea27d55361cf

gradle 6.2.1

commit d62c109abde8c46d5743b342478476e6a4bf2b81

gradle 6.2 (#50338)

commit dea25ff54d84853a08895024b0e4852930ba6023

gradle: depend on openjdk

commit 62097f382a5cfe9fd3448b6ad36970648d2a998c

gradle 6.1.1 (#49365)

commit 79f34e98c3f3bdf1164cfc2af01187b278176090

gradle 6.1 (#49059)

commit b90a59ed6542f4de54c8d8e1b8b61becc00ca66e

gradle 6.0.1

commit ca08d3c78a9a8f4e6a5249389442ebcb962eea0d

gradle 6.0 (#46523)

commit be6b82f442d8a72170bde83b2b2e79a66f342259

gradle 5.6.4 (#46090)

commit d38412e5787aea072319c09ba6557dc58592e847

gradle 5.6.3 (#45498)

commit ff9eb9e79f6ee4c5636e85ab67cb551e3a430221

gradle 5.6.2 (#43905)

commit c09ff3f2cfef6ec8b14c2bd22a01ea438f615cff

gradle 5.6.1 (#43528)

commit 5b33b4ee81efc4c0d6187bd32b2d3c1401bfdc9e

gradle 5.6

commit 70cfae2f21908d936f2cb87e71bf4c68b4e89ea6

gradle 5.5.1 (#41828)

commit 783b91c0aa72719e580bbfde633cbfa86d8cda40

gradle 5.5 (#41432)

commit 639b4c8d71af8cae918d771c1a990ae128f94777

gradle 5.4.1

commit dc3c3869462065f0139ede3407bcdf7de1088273

gradle 5.4 (#38962)

commit b196924abf02be1b43bcfbe5d023a72882648943

gradle 5.3.1 (#38447)

commit 96e1958c5e556290fe1a86b4e2423ce989322bae

gradle 5.3 (#38132)

commit a55e68888262857e299aa77b3ffa56b767702993

gradle 5.2.1 (#36856)

commit 111fb3f6cf6bd1b002f6d3ad9593553eeb584f24

gradle 5.2

commit 7168e82df590e188ab853ce886747d632b50ddcb

gradle 5.1.1 (#35899)

commit 4fa14b4eb3ed83dbe160bfc07525d118fe25a9af

gradle: require Java 8+ (#35683)

commit b113e0dd77942be1efead43dff26cc08bc8a22b7

gradle 5.1 (#35659)

commit ff73b8cc3530acadbe0fe7070cf7ad754c7cad27

gradle 5.0 (#34474)

commit 01e0511df2c37b052a9659797f3c09df3f20d533

gradle 4.10.2

commit 4952bb218ae24ef0c6dbc20fb1e73e0a45d6868d

gradle 4.10.1 (#32064)

commit 62adf35f5870c5ceb69e855014c868ab37d56bdf

gradle: update description

commit d6626b2e3ceb3a866a10e2ef6e548433eca46293

gradle 4.10

commit 8ef2dd0e340ace99d9ca026b39a906a6a61c9603

gradle 4.9 (#30118)

commit 572f5e82dde2b6e8934d9a40313b187eb999fde7

gradle 4.8.1 (#29312)

commit 847c2b9334a840da186be060d10d6c3acc775510

gradle 4.8 (#28638)

commit a138a8c76dfed75f5c63117e29d95e502daef3b9

gradle 4.7 (#26798)

commit 676b1d18fe9b25573fbe696bbcf100c5256aba3e

gradle 4.6 (#24652)

commit 64df10957916dd31655f091de8e0d5a7d3a53f86

gradle 4.5.1 (#23706)

commit ee692bfd9519c0325a1532a61253fbfc08ed3c54

gradle 4.5 (#23281)

commit 980b966566e134562ad00e92f0e2da4e3278cb97

gradle 4.4.1 (#21974)

commit c6094c128502f7eaa0bfbd88524f16e98e20c9c6

gradle 4.4 (#21384)

commit 6f914362884a894fe56a4f83562da52d91444c2f

gradle 4.3.1 (#20420)

commit 03313aababb639e0500bb0a6dcd3b8db586384ef

gradle 4.3 (#20055)

commit ef4f6b5e80349e3702f973d254484faa8dafe820

gradle 4.2.1 (#18869)

commit da2d2b562e47f988eccd5fc181c30475d23f49ac

gradle 4.2 (#18356)

commit cbfda9b8d3700792f6dae505e9e3cab5466d65c7

gradle: remove deprecated ENV.java_cache

commit 29f255bc744f7f0270f2b37ef5f9636c97a34961

gradle 4.1 (#16517)

commit 104587b311714be006d2cc0323fa0addc8f17634

gradle 4.1-rc-2 (devel) (#16252)

commit def7cc594c00028195b0ddc91df5c624dd99425f

gradle 4.1-rc-1 (devel) (#16168)

commit ba84b046665bbf9d8d21c7698f7336420a2129ef

gradle 4.0.2 (#16107)

commit 2f43b3eab9cb74dbb1e3ffb45af62c4044601e2e

gradle 4.1-rc-1 (devel)

commit 2664f714ce596ac6315764ecd2dbca26e66326b6

gradle 4.0.1 (#15394)

commit e591e57b245887f2ef4be91d5852016d2353b680

gradle 4.0 (#14592)

commit 76e7e9046c963cf372d124e4a3dcb8e226732bbd

gradle 3.5 (#12299)

commit d8237f7deea92df0e77a87f8e6a7ddbf87028f6b

gradle 3.4.1

commit 3d5e7faadca286f05760c40b5fdf70048fe3c0b2

gradle 3.4

commit 74edf375423cbdf042bcab464e65f09426c0190f

gradle 3.3

commit 3f1e449711ca5d646fdf31cf58d9a2d1d0e482fe

gradle: use inline if.

commit 2748902229d2516ffa29d6995ef79f228c9b46ed

gradle: add option to install gradle-all

commit c562cf22b00af2cbd59cc34076e394f5ceafcdab

gradle 3.2.1

commit 408bcddd0172f647f70fddab586b0b6808483794

gradle 3.2 (#6923)

commit 7a4dabfc1a2acd9f01a1670fde4f0094c4fb6ffa

Use hash rockets again. (#5177)

commit 7a6a40e0aca3c5d041beed1e6f8f1226868fe370

gradle 3.1 (#4982)

commit 303660134f72cffaef94f87abfb6bfeedccc0e1c

Use Ruby 1.9+ symbol hash keys in all formulae. (#4942)

commit 6434d58d7ee6957b5c202619e9c4832dfdab62a5

gradle: correct java dependency to 1.7 (#3943)

commit e7ee228c7354e2071ec8a23ec7fe788d82d9a5be

gradle 3.0 (#3905)

commit 0c8a3617e6a26b0a6191226bbea5262080490c52

gradle: style nits

commit c4b6cc478a2bf8e4d9e1fd258322b4f32656a7ce

gradle 2.14.1, 3.0-milestone-2 (devel) (#3118)

commit 991a0d8bc995dfdcfc56ac6d848976b787a87e83

gradle 2.14, 3.0-milestone-1 (devel) (#1980)

commit 4e8122d9360f23f906598c8ffdbbe2bffc24571e

gradle 2.14-rc-5 (devel) (#1784)

commit 57b468c6fa7197fb15d7370dd96fd49eaecceafc

gradle 2.14-rc-4 (devel) (#1698)

commit a1f9cdf9ccc7858e5143d9cbc6d959f7e38b9c01

gradle: don't write wrapper script.

commit 9e8ef6d5edeceaf9d9979616de7625e399b03cac

gradle 2.14-rc-3 (devel) (#1573)

commit 47b5ace4b62094932f291c3d8d20985499a3902a

gradle: set GRADLE_HOME in wrapper script. (#1543)

commit 55f867a9a5ab27b52b3cc2d1181555325f69248e

gradle 2.14-rc-2 (devel)

commit f5016a81d421eda8960974819e742d47dab24fc5

gradle: fix incorrect devel version reporting (#1323)

commit 54df8e0f94de12f9e9727f08a2ff9966119394a8

gradle 2.14-rc-1 (devel) (#1277)

commit df07b59fbed8ee73baef662a85766f2ab7ebe4bf

gradle 2.13

commit c77fa5f620654a3b43187f4c688e51f436c08b30

gradle-2.12

commit 9e8779899c0d037d3fd2fd008025b6bdd76121ff

gradle 2.11

commit 24fa2cc36b67f16b10f3a566c7d63088d4344d67

gradle 2.10

commit dc93994dc4b0d54b6fef4eb3a36776f9479f21ce

gradle 2.9

commit 69d9eb76041b0e89a6f777956c1989a570bf282f

gradle: bottle unneeded

commit dce8562527d9ab92a375b07b5bb826a84a3ee68e

gradle 2.8

commit 749972b2aa02e403ba6abfb1e3e7b427bc5f2662

gradle 2.7

commit 25ac7549e908540dbf661df6f2bb55093f8a603e

gradle 2.6

commit c3d89f669569f358bb7feceefbe85ba9dca66ee5

Gradle 2.5

commit 758f6e95332ffdb89a2ecf802bbd2cf045816985

Add descriptions to all remaining homebrew packages

commit e3dcfb2cc48502190ce944916e62a59751484ae3

gradle 2.4

commit a2b852dc2b0370d53c2abcffa8e6a95d6263e5f2

gradle: remove devel as older than stable.

commit d151dfc4a5f730bb3af6d507fe7705ddc5f450ec

gradle 2.3

commit 48745e1bd0e0184cd2d9d39f04dd3b0f49ef8fc8

gradle 2.3-rc-4 (devel)

commit 771bbea80c94f572a503bf58187780f13822cfaf

gradle 2.3-rc-3 (devel)

commit eafaf830bfc932079d20519a11211aca42875b6e

gradle 2.2.1

commit 4aca8c444c3b96829ab090aa14ae8031ba4c7dcc

gradle 2.2

commit 3040d24c4c959c5bf2f3bf44685b56ccbf7ca39e

gradle 2.1

commit 2607162446ec1863e08b3677c27076f86313dd18

gradle 2.1-rc-2 (devel)

commit 0ed48ca22a4843ec099a7a535052102f5e6c6aa3

gradle 2.1-rc-1 (devel)

commit 88dec7c0851a6335b32b752a18b225894d3bada3

gradle 2.0

commit b2b10f958b9588f845907dac279c806bd92f0b5a

gradle 2.0-rc-2 (devel)

commit 701f3511fdee1b63db047b23f86888149d12a2ff

gradle 2.0-rc-2 (devel)

commit b1214cd9b3f67d9a64759acbcb80ef2c501a894d

update developer version to gradle 2.0 RC2

commit 88fafb297dc125d7785833693ee847d2f6981cac

gradle 2.0-rc-1

commit e4ed5c202d7268128de570ceec8b8fbcf27a91c9

gradle 1.12

commit d5df7d0d07e3a9d0f5beb25d62f4f7dbdbf93067

gradle 1.11

commit 155d700c55fd323352241c4550e4320a59c5264d

gradle 1.11-rc-1

commit 4f8bc64fa7e5ea50d551365f43a2267d06251248

gradle 1.10

commit 4c5c98c14cf8345ec30361454505a3b3c1df9389

gradle 1.10-rc-1

commit ca2d78af0e2b32d3ca7cd9a693a4824a4b05f505

gradle 1.9

commit 3e30cd2dc2ffd31d2ac43373116c87fb197c3a94

gradle 1.9-rc4

commit d812d5247feb4a40cd3c38d4f2385aa5ce458d4c

gradle devel 1.9-rc3

commit a1a5cae40e6eed8a69a2723b7a180a91c8162945

gradle 1.9-rc2

commit 5e60212ac77b7a238e0920b85fe8a4d4dc5e9938

gradle 1.9-rc1

commit 1f87890bd0b8868c2845d2ad9ffee698c262cdd2

gradle 1.8

commit f73bf5acd75ebc8c52332d9e8c346b1dfd6a158e

gradle 1.8-rc2

commit 9c8f5dc31c0f5ba6b96a36946cf20e10ccabd355

gradle-1.8-rc-1

commit 2be44de8d0ef394f3a146442fa68c0624041d096

Gradle 1.7

commit c07757a391859217f8ed3e72c97d954dfcb5ad88

Gradle devel 1.7-rc-2

commit 124c3bebca2aaefdefb3ba5d38d4c82bc7bf99d0

gradle: add 1.7-rc1 as devel

commit 43f6d92330e4c39200ab9ff278d56c47ea0e5a1b

Gradle 1.6

commit c3f1378a454478e79146f33ab633bb78117ef0c7

gradle 1.5

commit 9a77938bdd0547dc9f4f16ec074f64abb731c87b

gradle 1.4

commit 575e098794dcefd1ec830ceec236b248af1cdbec

gradle: keep bat file(s)

commit 11b4fdf17400efd4103cda800f4ee44cc78f2d09

Gradle 1.3

commit 387a3fed2e35ac5b4c8b46980c5215c9c6119256

gradle 1.2

commit 1b9b9dcbdc218603685caff931b1f935f908eb1a

gradle devel 1.2-rc1

commit 8136274dcf6136a397eaeb58270e2b85d0c2b0ae

Gradle 1.1

commit 86ffc932fe96164230b6cd457c76393d8591b988

Gradle 1.0

 

 

Se vuoi farmi qualche richiesta o contattarmi per un aiuto riempi il seguente form

    Comments