Gradle
Gradle is (a lot) better than Maven.
Problem: Gradle uses all 32 threads of your CPU, and that hurts…
No problem. Set the max workers option.
On the command-line:
./gradlew --max-workers 8 some-massivly-parrallel-gradle-task
In the ${HOME}/.gradle/gradle.properties file:
org.gradle.workers.max=8
Plugins
- Java plugin (dependency configurations)
- Java library plugin (configurations)
- War plugin (dependency management)
Maven scopes vs. gradle configurations
Maven scopes don’t translate perfectly to Gradle configurations because Gradle configurations are more granular. However, here’s a table that translates between Maven scopes and Gradle configurations with a few notes about differences:
| Maven Scope | Equivalent Gradle Configuration |
|---|---|
compile |
api if the dependency should be exposed to consumers, implementation if not |
provided |
compileOnly (note that the provided Maven scope is also available at runtime while the compileOnly Gradle configuration is not) |
runtime |
runtimeOnly |
test |
testImplementation |