Skip to content

Commit

Permalink
Update Gradle wrapper to 7.3 (elastic#80633) (elastic#80642)
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-vieira authored Nov 10, 2021
1 parent 4fbc732 commit 89bcde3
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,23 @@
import org.gradle.api.Plugin;
import org.gradle.api.Project;
import org.gradle.api.provider.Provider;
import org.gradle.initialization.layout.BuildLayout;

import javax.inject.Inject;
import java.io.File;

public class VersionPropertiesPlugin implements Plugin<Project> {

private BuildLayout buildLayout;

@Inject
VersionPropertiesPlugin(BuildLayout buildLayout) {
this.buildLayout = buildLayout;
}

@Override
public void apply(Project project) {
File workspaceDir;
if (project.getGradle().getIncludedBuilds().isEmpty()) {
// This is an included build, use the parent directory as workspace root
workspaceDir = project.getRootDir().getParentFile();
} else {
workspaceDir = project.getRootDir();
}

// Register the service if not done yet
File infoPath = new File(buildLayout.getRootDirectory(), "build-tools-internal");
File infoPath = new File(workspaceDir, "build-tools-internal");
Provider<VersionPropertiesBuildService> serviceProvider = project.getGradle().getSharedServices()
.registerIfAbsent("versions", VersionPropertiesBuildService.class, spec -> {
spec.getParameters().getInfoPath().set(infoPath);
Expand Down
4 changes: 2 additions & 2 deletions build-tools-internal/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionSha256Sum=a8da5b02437a60819cad23e10fc7e9cf32bcb57029d9cb277e26eeff76ce014b
distributionSha256Sum=00b273629df4ce46e68df232161d5a7c4e495b9a029ce6e0420f071e21316867
2 changes: 0 additions & 2 deletions build-tools-internal/settings.gradle

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.2
7.3
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionSha256Sum=a8da5b02437a60819cad23e10fc7e9cf32bcb57029d9cb277e26eeff76ce014b
distributionSha256Sum=00b273629df4ce46e68df232161d5a7c4e495b9a029ce6e0420f071e21316867

0 comments on commit 89bcde3

Please sign in to comment.