Professional Documents
Culture Documents
============
There are some standard conventions so, for example, the Java plugin
adds standard configurations such as "api", "implementation",
"testImplementation" and others. These configurations can also inherit
from each other; more about this typic can be found here:
https://docs.gradle.org/current/userguide/
dependency_management_for_java_projects.html#dependency_management_for_java_project
s
https://docs.gradle.org/current/userguide/
java_library_plugin.html#sec:java_library_separation
https://docs.gradle.org/current/userguide/
java_plugin.html#sec:java_plugin_and_dependency_management
api - makes a dependency available for main classes, tests and any
other modules importing the project (exportable dependency),
dependencies {
implementation "foo.bar:baz"
}
If this is the first time "foo.bar:baz" is added to the project, we'd have
to add its version to "versions.props" file at the top level of the
checkout:
foo.bar:baz=1.2
and then regenerate the "versions.lock" file using the following
command:
gradlew --write-locks
where the hash code comes from versions.lock file. For example, at
the time of writing, jackson-databind has the following entry:
com.fasterxml.jackson.core:jackson-databind:2.10.0
projects -> 2.10.0
net.thisptr:jackson-jq -> 2.7.0
org.carrot2:carrot2-mini -> 2.9.9.3
The main branch of Apache Solr uses a prerelease of Apache Lucene that
is published by ASF Jenkins on:
https://nightlies.apache.org/solr/lucene-prereleases/
If you want to upgrade Lucene to a newer build proceed like the following:
- Go to https://ci-builds.apache.org/job/Solr/job/Lucene-prerelease-main/
- Log in with ASF account
- Press on "build now" on left side
- Wait until build is finished.... (can take long time, if other builds are
queued)
- remember the build number of Jenkins (left side, first build in list,
prefixed by '#')
- Edit ./versions.props and change Lucene's version to '9.0.0-prereleaseX',
with 'X' is the jenkins build number
- Edit ./gradle/defaults.gradle and change jenkins build number, too
(this directs the repository to the one created by latest build):
def lucenePrereleaseBuild = 'X'
- Run: gradlew --write-locks (as described before)
gradlew mavenToLocalRepo
The last step is to make sure the licenses, notice files and checksums
are in place for any new dependencies. This command will print what's
missing and where:
gradlew licenses
gradlew updateLicenses