Slackbot
08/18/2023, 8:53 AMJoffrey Bion
08/18/2023, 9:05 AMorg.gradle.java.installations.fromEnv
• org.gradle.java.installations.paths
• org.gradle.workers.max
• org.gradle.jvmargs
Jendrik Johannes
08/18/2023, 10:09 AMorg.gradle.jvmargs
the best (only?) option is to use the installation dir.
What we did in a company with many Gradle projects is to create a custom distribution. We wanted to make Gradle available for download in the company network anyway. So we now put gradle-bin.zip versions into the company internal artifactory. Before we upload them, they are enriched with the shared gradle.properties
file (add it to the root of the zip, and it will be in the root of the installation).
In the gradle-wrapper.properties
of all projects, we have the URL pointing at the gradle-bin.zip inside the company artifactory.
Our main use case was not about overriding values though. We wanted an automated way to share the values with all users without them having to manually maintain something in their user home. And without having to duplicate the same gradle.properties
file in ~200 git repos.Joffrey Bion
08/30/2023, 12:55 PMorg.gradle.java.installations.paths
for instance, to point to my pre-installed JDKs. But I would need to do this in a way that doesn't override the user's project-specific choice (if they have chosen to use this gradle property already to point to a special JDK that they install in a specific place, for instance).