Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run Gradle Wrapper on Windows 7?

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'
like image 544
IAmYourFaja Avatar asked Jul 31 '14 15:07

IAmYourFaja


People also ask

How do I run Gradle wrapper on Windows?

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.


2 Answers

just run in the cmd

  • bash ./gradlew test
like image 124
Rihab Avatar answered Oct 23 '22 03:10

Rihab


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.

like image 29
Peter Niederwieser Avatar answered Oct 23 '22 01:10

Peter Niederwieser