How to run Gradle from the command line on Mac bash

后端 未结 2 672
孤街浪徒
孤街浪徒 2021-01-31 12:56

I have a very simple question. I am brand new to Mac and I am trying to get my Java project moved over to my new Mac. The project has a Gradlew file that I thought I could run f

相关标签:
2条回答
  • 2021-01-31 13:26

    ./gradlew

    Your directory with gradlew is not included in the PATH, so you must specify path to the gradlew. . means "current directory".

    0 讨论(0)
  • 2021-01-31 13:41

    Also, if you don't have the gradlew file in your current directory:

    You can install gradle with homebrew with the following command:

    $ brew install gradle
    

    As mentioned in this answer. Then, you are not going to need to include it in your path (homebrew will take care of that) and you can just run (from any directory):

    $ gradle test 
    
    0 讨论(0)
提交回复
热议问题