If you get through these steps, you're ready to start using Gradle regularly:
- Install Gradle, see: https://docs.gradle.org/current/userguide/installation.html
- Get a current version of Lucene/Solr with the usual "git clone https://github.com/apache/lucene-solr.git dest"
- cd dest
- ./gradlew help. Gradlew is "gradle wrapper" and should automatically download gradle and start it running.
- ./gradlew helpAnt - For people already familiar with building Solr with Ant, this command will show Gradle tasks that are equivalent to selected Ant targets.
- The Gradle project is here if you have trouble, or ping the Lucene dev list: https://docs.gradle.org/current/userguide/installation.html
- ./help contains plain-text files you can scan, for instance 'ant.txt' is the output from `./gradlew helpAnt`.
|As of late August 2020, Ant support has been removed from trunk/9.0.|
- help - of course.
- helpAnt - lists Gradle commands that are the equivalent of what you 're may be used to in Ant.
- assemble - will create a runnable Solr instance in ./solr/packaging/build/solr-#.#.#-SNAPSHOT. However, it will delete that directory next time it's run.
- dev - will do what like assemble does, but will write the output code to ./solr/packaging/build/dev and will not delete the directory first. Use this if you're developing code, instantiating Solr and recompiling and need to preserve , say, your collectionssetup.
- tasks - lists all the tasks you can execute. There are a lot of them...
- check - will run all of the checks (ant precommit+) and run all of the tests. Please get in the habit of running this! More below for why in "Differences from Ant".
- Adding -x test will run all the validation checks but not run tests (this is the rough equivalent of ant precommit)
The first time you run these commands, all of the dependencies for Solr will be downloaded to (*nix) ~/.gradle.caches, and this process may take quite some time depending on your network connectivity.
Differences from Ant:
Some operations that are simply different from Ant. Here are some hints to help with these: