mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-09 14:34:43 +00:00
Build: Move gradle wrapper jar to a dot dir (#30146)
This commit moves the gradle wrapper jar file to a hidden directory, so that it does not clutter the top level names seen when doing an ls in the project. The actual jar file is never manually edited, and only changed by running `./gradlew wrapper ...` so it is not important for this directory to be "visible".
This commit is contained in:
parent
d12e644206
commit
a324cd41f7
Binary file not shown.
@ -1,6 +1,6 @@
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionSha256Sum=203f4537da8b8075e38c036a6d14cb71b1149de5bf0a8f6db32ac2833a1d1294
|
29
build.gradle
29
build.gradle
@ -440,25 +440,18 @@ task run(type: Run) {
|
||||
impliesSubProjects = true
|
||||
}
|
||||
|
||||
task wrapper(type: Wrapper)
|
||||
|
||||
gradle.projectsEvaluated {
|
||||
|
||||
allprojects {
|
||||
tasks.withType(Wrapper) { Wrapper wrapper ->
|
||||
wrapper.distributionType = DistributionType.ALL
|
||||
|
||||
wrapper.doLast {
|
||||
final DistributionLocator locator = new DistributionLocator()
|
||||
final GradleVersion version = GradleVersion.version(wrapper.gradleVersion)
|
||||
final URI distributionUri = locator.getDistributionFor(version, wrapper.distributionType.name().toLowerCase(Locale.ENGLISH))
|
||||
final URI sha256Uri = new URI(distributionUri.toString() + ".sha256")
|
||||
final String sha256Sum = new String(sha256Uri.toURL().bytes)
|
||||
wrapper.getPropertiesFile() << "distributionSha256Sum=${sha256Sum}\n"
|
||||
}
|
||||
}
|
||||
task wrapper(type: Wrapper) {
|
||||
distributionType = DistributionType.ALL
|
||||
jarFile = file('.gradle-wrapper/gradle-wrapper.jar')
|
||||
doLast {
|
||||
final DistributionLocator locator = new DistributionLocator()
|
||||
final GradleVersion version = GradleVersion.version(gradleVersion)
|
||||
final URI distributionUri = locator.getDistributionFor(version, distributionType.name().toLowerCase(Locale.ENGLISH))
|
||||
final URI sha256Uri = new URI(distributionUri.toString() + ".sha256")
|
||||
final String sha256Sum = new String(sha256Uri.toURL().bytes)
|
||||
final String existingProperties = getPropertiesFile().getText('UTF-8')
|
||||
getPropertiesFile().setText("${existingProperties}distributionSha256Sum=${sha256Sum}\n", 'UTF-8')
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static void assertLinesInFile(final Path path, final List<String> expectedLines) {
|
||||
|
2
gradlew
vendored
2
gradlew
vendored
@ -64,7 +64,7 @@ case "`uname`" in
|
||||
;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
CLASSPATH=$APP_HOME/.gradle-wrapper/gradle-wrapper.jar
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
|
BIN
gradlew.bat
vendored
BIN
gradlew.bat
vendored
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user