我正在開發一個只與Gradle 3.5兼容的項目。您可以在下面看到,我正在運行Gradle 4.0並希望降級,最好是繼續使用Macports來管理安裝。使用Macports選擇Gradle版本?
問題是,我該如何選擇使用gradle @3.5_0
?
我的呼叫的第一端口是卸載搖籃和使用替代手段重新安裝。卸載(下)時,我發現我有Gradle 3.5,我只需要激活它。
[email protected] ~ $ sudo port uninstall gradle
Password:
The following versions of gradle are currently installed:
1) gradle @3.2.1_0
2) gradle @3.3_0
3) gradle @3.5_0
4) gradle @4.0_0
5) gradle @4.0.1_0 (active)
Enter option(s) [1-5/all]: 4
---> Uninstalling gradle @4.0_0
標準MacPorts的方式做到這一點是使用select
,但沒有工作,如下圖所示:
[email protected] ~ $ port select gradle @3.5_0
Selecting '@3.5_0' for 'gradle' failed: The specified group 'gradle' does not exist.
的select
命令依靠的MacPorts意識到多個版本存在並且可以被選擇。據MacPorts的,沒有這樣的列表存在搖籃,如下圖所示:
[email protected] ~ $ port select gradle
Warning: Unable to get active selected version: The specified group 'gradle' does not exist.
Error: The 'list' command failed: The specified group 'gradle' does not exist.
感謝您的回答以及您在macports上的所有努力 – Matthew
獲取所有可用版本的簡單方法是'port installed gradle'。 – Matthew