1

Like pik which provides the facility to switch between ruby versions on the fly from command prompt, is there any tool which provides the same kind of behavior for gradle, so that i can switch to gradle version I'm using based on need.

I googled it, but couldn't find proper solution. So posting here.

Below error I'm getting when use sdkman windows version:

PS C:\Users\user> Import-Module posh-gvm
This command is not available in offline mode.
At C:\Users\user\Documents\WindowsPowerShell\Modules\posh-gvm\Utils.ps1:294 char:14
+         throw <<<<  'This command is not available in offline mode.'
    + CategoryInfo          : OperationStopped: (This command is...n offline mode.:String) [], RuntimeException
    + FullyQualifiedErrorId : This command is not available in offline mode.

Import-Module : The specified module 'posh-gvm' was not loaded because no valid module file was found in any module dir
ectory.
At line:1 char:14
+ Import-Module <<<<  posh-gvm
    + CategoryInfo          : ResourceUnavailable: (posh-gvm:String) [Import-Module], FileNotFoundException
    + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand
Opal
  • 81,889
  • 28
  • 189
  • 210
kaluva
  • 621
  • 8
  • 27
  • Your gvm issue should really be a separate question. Pointing to sdkman/gvm answers your original question. – RaGe Feb 10 '16 at 13:31
  • see if this helps: https://github.com/flofreud/posh-gvm/issues/13 – RaGe Feb 10 '16 at 14:05
  • @RaGe yeah.. thanks for the link.. that gvm issue because Windows Powershell version 2.x installed in my machine as mentioned in the link. I can't upgrade to 3.x as its my office laptop. Anyways, i'm marking the answer as accepted. – kaluva Feb 11 '16 at 05:01

1 Answers1

1

Yes, there's such tool. It's called sdkman. You can easily switch between versions of gradle, groovy and other available frameworks, languages.

Opal
  • 81,889
  • 28
  • 189
  • 210
  • Hi, i 've gone through that. But i don't see straightforward approach for windows. Getting several errors when i use "powershell" version for windows users. Updated question with the error. – kaluva Feb 10 '16 at 09:51
  • Not a windows user, can't help you :/ – Opal Feb 10 '16 at 09:55
  • 1
    that gvm issue because Windows Powershell version 2.x installed in my machine as mentioned here : github.com/flofreud/posh-gvm/issues/13. But I can't upgrade to 3.x as its my office laptop. It will work for the users who can install Powershell 3.x or above. So, i'm marking the answer as accepted. – kaluva Feb 11 '16 at 05:02