Reputation: 435
I have 2 groovy class files under one rootProject. I want to run just one of them without running the other one. How can I do that using intellij command line and command prompt. Right now when I run the rootProject both files run one after the other. Is there any setting required build.gradle file then please explain hoow can I do that as I am very new to gradle and don't know much about it. Thanks!
Upvotes: 0
Views: 880
Reputation: 10675
Yes you can create intellij config to run your script.
Follow these steps:
1) Edit configuration
2) Add new Groovy configuration
Upvotes: 1
Reputation: 1019
If you have only those two groovy scripts (and there is nothing to compile etc.), you do not need Gradle to run it at all. From command line call
groovy <filename>.groovy
To run the script directly from Gradle Script, use
new GroovyShell().run(file('somePath'))
Upvotes: 1