Merge branch '2.7.x' into 3.0.x

This commit is contained in:
Phillip Webb
2023-02-21 23:15:40 -08:00
1890 changed files with 27173 additions and 21952 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 the original author or authors.
* Copyright 2012-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -224,8 +224,9 @@ public class GradleBuild {
if (repository.exists()) {
FileSystemUtils.copyRecursively(repository, new File(this.projectDir, "repository"));
}
GradleRunner gradleRunner = GradleRunner.create().withProjectDir(this.projectDir)
.withPluginClasspath(pluginClasspath());
GradleRunner gradleRunner = GradleRunner.create()
.withProjectDir(this.projectDir)
.withPluginClasspath(pluginClasspath());
if (this.dsl != Dsl.KOTLIN && !this.configurationCache) {
// see https://github.com/gradle/gradle/issues/6862
gradleRunner.withDebug(true);
@@ -301,14 +302,17 @@ public class GradleBuild {
private String getProperty(File propertiesFile, String key) {
try {
assertThat(propertiesFile).withFailMessage("Expecting properties file to exist at path '%s'",
propertiesFile.getCanonicalFile()).exists();
assertThat(propertiesFile)
.withFailMessage("Expecting properties file to exist at path '%s'", propertiesFile.getCanonicalFile())
.exists();
Properties properties = new Properties();
try (FileInputStream input = new FileInputStream(propertiesFile)) {
properties.load(input);
String value = properties.getProperty(key);
assertThat(value).withFailMessage("Expecting properties file '%s' to contain the key '%s'",
propertiesFile.getCanonicalFile(), key).isNotEmpty();
assertThat(value)
.withFailMessage("Expecting properties file '%s' to contain the key '%s'",
propertiesFile.getCanonicalFile(), key)
.isNotEmpty();
return value;
}
}