# Running two versions side by side

**URL:** <https://discuss.gradle.org/t/running-two-versions-side-by-side/40765>\
**Category:** Help/Discuss\
**Created:** [August 17, 2021, 2:52pm UTC](https://discuss.gradle.org/t/running-two-versions-side-by-side/40765 "2021-08-17T14:52:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![moojjoo](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/moojjoo/32/9363_2.png) [@moojjoo](https://discuss.gradle.org/u/moojjoo)\
**Post date:** [August 17, 2021, 2:52pm UTC](https://discuss.gradle.org/t/running-two-versions-side-by-side/40765/1 "2021-08-17T14:52:48Z")

</div>

If you have two versions of Gradle (Windows 10) running side by side - 6.4.1 and 7.0.2. When you run gradle -v I am returned 6.4.1. How do I get it to switch to 7.0.2. In my Environment Settings both are listed. Do I need to remove one (Note locked down machine hint hint).

---

<div class="post-metadata">

**Author:** ![Vampire](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/vampire/32/9082_2.png) [@Vampire](https://discuss.gradle.org/u/Vampire)\
**Post date:** [August 18, 2021, 10:14am UTC](https://discuss.gradle.org/t/running-two-versions-side-by-side/40765/2 "2021-08-18T10:14:29Z")

</div>

That’s more a question to your operating system / shell.  
If you do `gradle -v`, your shell uses the one that comes first in the `PATH` environment variable.  
To change that, you need to change the `PATH` variable.  
There are also tools like `sdkman` and similar that can switch between different Gradle versions.

But actually you shouldn’t really need that, or even need an installed Gradle version, let alone two.  
Imho every project that does not have the Gradle wrapper in use has a bug.  
And if the Gradle wrapper is in use, then you don’t even need to have one Gradle version installed, as the wrapper downloads the correct Gradle version for that build from the URL configured in the wrapper properties file.

---

<div class="post-metadata">

**Author:** ![moojjoo](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/moojjoo/32/9363_2.png) [@moojjoo](https://discuss.gradle.org/u/moojjoo)\
**Post date:** [August 18, 2021, 6:55pm UTC](https://discuss.gradle.org/t/running-two-versions-side-by-side/40765/3 "2021-08-18T18:55:32Z")

</div>

@Vampire I do not disagree with any of your statements. I did change the order of the system Variable =GRADLE\_HOME; Value=C:\Program Files~\*7.02.7\bin; C:\Program Files~\*6.4.1\bin; and restarted and no luck. I have raised this issue internally as I am working on a very locked down system. Cyber Security you got to respect policy and procedure.

---

<div class="post-metadata">

**Author:** ![Vampire](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/vampire/32/9082_2.png) [@Vampire](https://discuss.gradle.org/u/Vampire)\
**Post date:** [August 18, 2021, 11:09pm UTC](https://discuss.gradle.org/t/running-two-versions-side-by-side/40765/4 "2021-08-18T23:09:38Z")

</div>

Wrong variable, not `GRADLE_HOME`, but `PATH`.

---

<div class="post-metadata">

**Author:** ![moojjoo](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/moojjoo/32/9363_2.png) [@moojjoo](https://discuss.gradle.org/u/moojjoo)\
**Post date:** [August 19, 2021, 5:06pm UTC](https://discuss.gradle.org/t/running-two-versions-side-by-side/40765/5 "2021-08-19T17:06:27Z")

</div>

@Vampire that did it with a restart. Thank you. Now on to the next problem —

- Type ‘com.moowork.gradle.node.npm.NpmSetupTask’ property ‘args’ is missing an input or output annotation.

---

<div class="post-metadata">

**Author:** ![Vampire](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/vampire/32/9082_2.png) [@Vampire](https://discuss.gradle.org/u/Vampire)\
**Post date:** [August 19, 2021, 9:58pm UTC](https://discuss.gradle.org/t/running-two-versions-side-by-side/40765/6 "2021-08-19T21:58:09Z")

</div>

> <https://github.com/srs/gradle-node-plugin/issues/377>
>
> Hi
> 
> I'm using the latest version of this plugin:
> 
> plugins {
> id "com.moowo…rk.node" version "1.3.1"
> }
> 
> After I've upgraded from Gradle 6.8.3 to Gradle 7 my project fails to build due to the error:
> \`\`\`
> 
> A problem was found with the configuration of task ':my-project:yarnSetup' (type 'YarnSetupTask').
> - Type 'YarnSetupTask' property 'args' is missing an input or output annotation.
> 
> Reason: A property without annotation isn't considered during up-to-date checking.
> 
> Possible solutions:
> 1. Add an input or output annotation.
> 2. Mark it as @Internal.
> 
> Please refer to https://docs.gradle.org/7.0/userguide/validation\_problems.html#missing\_annotation for more details about this problem.
> \`\`\`
> 
> How can I fix it?
