Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: minor changes, especially ./gradlew will install Gradle


If you get through these steps, you're ready to start using Gradle regularly:

  1. Install Gradle, see:
  2. Get a current version of Lucene/Solr with the usual "git clone dest"
  3. cd dest
  4. ./gradlew help. Gradlew is "gradle wrapper" and should automatically download gradle and start it running.
  5. ./gradlew helpAnt - For people already familiar with building Solr with Ant, this command will show Gradle tasks that are equivalent to selected Ant targets.
  6. The Gradle project is here if you have trouble, or ping the Lucene dev list:
  7. ./help contains plain-text files you can scan, for instance 'ant.txt' is the output from `./gradlew helpAnt`.

titleGradle on trunk/9.0 only
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. (plus)
  • 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. (plus)
  • 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)

(plus) 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: