Skip to content

Commit df3b3ae

Browse files
authored
Update to Gradle 9.1.0 (#19329)
Signed-off-by: Andrew Ross <[email protected]>
1 parent 8f59bf2 commit df3b3ae

File tree

24 files changed

+78
-57
lines changed

24 files changed

+78
-57
lines changed

.github/workflows/detect-breaking-change.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
with:
1616
cache-disabled: true
1717
arguments: japicmp
18-
gradle-version: 8.14.3
18+
gradle-version: 9.1.0
1919
build-root-directory: server
2020
- if: failure()
2121
run: cat server/build/reports/java-compatibility/report.txt

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6565
- [Flaky Test] Fix flaky test IngestFromKinesisIT.testAllActiveIngestion ([#19380](https://github.com/opensearch-project/OpenSearch/pull/19380))
6666

6767
### Dependencies
68+
- Update to Gradle 9.1.0 ([#19329](https://github.com/opensearch-project/OpenSearch/pull/19329))
6869
- Bump `com.netflix.nebula.ospackage-base` from 12.0.0 to 12.1.0 ([#19019](https://github.com/opensearch-project/OpenSearch/pull/19019))
6970
- Bump `actions/checkout` from 4 to 5 ([#19023](https://github.com/opensearch-project/OpenSearch/pull/19023))
7071
- Bump `commons-cli:commons-cli` from 1.9.0 to 1.10.0 ([#19021](https://github.com/opensearch-project/OpenSearch/pull/19021))

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ import org.gradle.plugins.ide.eclipse.model.SourceFolder
4747
import org.gradle.api.Project;
4848
import org.gradle.process.ExecResult;
4949
import org.opensearch.gradle.CheckCompatibilityTask
50+
import groovy.xml.XmlParser;
5051

5152
import static org.opensearch.gradle.util.GradleUtils.maybeConfigure
5253

buildSrc/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ dependencies {
130130
testFixturesApi gradleTestKit()
131131
testImplementation 'org.wiremock:wiremock-standalone:3.6.0'
132132
testImplementation "org.mockito:mockito-core:${props.getProperty('mockito')}"
133-
integTestImplementation('org.spockframework:spock-core:2.3-groovy-3.0') {
133+
integTestImplementation('org.spockframework:spock-core:2.4-M6-groovy-4.0') {
134134
exclude module: "groovy"
135135
}
136136
}
@@ -218,6 +218,7 @@ if (project != rootProject) {
218218
// Track reaper jar as a test input using runtime classpath normalization strategy
219219
tasks.withType(Test).configureEach {
220220
inputs.files(configurations.reaper).withNormalizer(ClasspathNormalizer)
221+
jvmArgs += ["--add-opens", "java.base/java.lang=ALL-UNNAMED"]
221222
}
222223

223224
normalization {

buildSrc/src/main/groovy/org/opensearch/gradle/AntTask.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
package org.opensearch.gradle
3131

32+
import groovy.ant.AntBuilder
3233
import org.apache.tools.ant.BuildListener
3334
import org.apache.tools.ant.BuildLogger
3435
import org.apache.tools.ant.DefaultLogger

buildSrc/src/main/groovy/org/opensearch/gradle/plugin/PluginBuildPlugin.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ class PluginBuildPlugin implements Plugin<Project> {
174174

175175
private static void configureDependencies(Project project) {
176176
project.dependencies {
177-
if (BuildParams.internal) {
177+
if (BuildParams.isInternal) {
178178
compileOnly project.project(':server')
179179
testImplementation project.project(':test:framework')
180180
} else {

buildSrc/src/main/groovy/org/opensearch/gradle/precommit/LicenseHeadersTask.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ import org.gradle.api.tasks.OutputFile
4141
import org.gradle.api.tasks.PathSensitive
4242
import org.gradle.api.tasks.PathSensitivity
4343
import org.gradle.api.tasks.SkipWhenEmpty
44+
import groovy.ant.AntBuilder
4445

4546
import javax.inject.Inject
4647

buildSrc/src/main/groovy/org/opensearch/gradle/test/AntFixture.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
package org.opensearch.gradle.test
3131

32+
import groovy.ant.AntBuilder
3233
import org.apache.tools.ant.taskdefs.condition.Os
3334
import org.gradle.api.Project
3435
import org.gradle.api.GradleException

buildSrc/src/main/groovy/org/opensearch/gradle/test/ClusterConfiguration.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
*/
2929
package org.opensearch.gradle.test
3030

31+
import groovy.ant.AntBuilder
3132
import org.opensearch.gradle.Version
3233
import org.gradle.api.GradleException
3334
import org.gradle.api.Project

buildSrc/src/main/groovy/org/opensearch/gradle/test/TestWithSslPlugin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public class TestWithSslPlugin implements Plugin<Project> {
5050

5151
@Override
5252
public void apply(Project project) {
53-
File keyStoreDir = new File(project.getBuildDir(), "keystore");
53+
File keyStoreDir = new File(project.getLayout().getBuildDirectory().getAsFile().get(), "keystore");
5454
TaskProvider<ExportOpenSearchBuildResourcesTask> exportKeyStore = project.getTasks()
5555
.register("copyTestCertificates", ExportOpenSearchBuildResourcesTask.class, (t) -> {
5656
t.copy("test/ssl/test-client.crt");
@@ -74,7 +74,7 @@ public void apply(Project project) {
7474
});
7575

7676
project.getPlugins().withType(TestClustersPlugin.class).configureEach(clustersPlugin -> {
77-
File keystoreDir = new File(project.getBuildDir(), "keystore/test/ssl");
77+
File keystoreDir = new File(project.getLayout().getBuildDirectory().getAsFile().get(), "keystore/test/ssl");
7878
File nodeKeystore = new File(keystoreDir, "test-node.jks");
7979
File clientKeyStore = new File(keystoreDir, "test-client.jks");
8080
@SuppressWarnings("unchecked")

0 commit comments

Comments
 (0)