I am trying to follow a tutorial on downloading, installing and running a Groovy app, and the instructions say that I can run the app via:
./gradlew myapp
I have installed Gradle on my Windows 7 machine under D:\gradle
. If I run gradle -v
I get:
------------------------------------------------------------
Gradle 1.11
------------------------------------------------------------
Build time: 2014-02-11 11:34:39 UTC
Build number: none
Revision: a831fa866d46cbee94e61a09af15f9dd95987421
Groovy: 1.8.6
Ant: Apache Ant(TM) version 1.9.2 compiled on July 8 2013
Ivy: 2.2.0
JVM: 1.7.0_51 (Oracle Corporation 24.51-b03)
OS: Windows 7 6.1 amd64
So I know its installed correctly. But then when I run:
.\gradlew myapp
I get:
-bash: ./gradlew: No such file or directory
When I run:
gradlew myapp
I get:
-bash: gradlew: command not found
What is going on here?
Update
My directory structure:
D:\
lazybones\
0.7\
lazybones-0.7\
lazybones\
bin\
lazybones.bat
my-template
When I go to my D:\
drive and run lazybones/0.7/lazybones-0.7/bin/lazybones.bat installPackageMyTemplate
I get:
There is no command 'installPackageMyTemplate'
To run a Gradle command, open a command window on the project folder and enter the Gradle command. Gradle commands look like this: On Windows: gradlew <task1> <task2> … e.g. gradlew clean allTests.
just run in the cmd
gradlew.bat
is a batch script that bootstraps Gradle. It needs to be committed to source control along with the rest of the project. If your project doesn't have a gradlew.bat
, you can generate one with gradle wrapper
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With