Skip to content

Commit 7974541

Browse files
authored
Dependency updates (#579)
2 parents 4a417b5 + a581639 commit 7974541

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+377
-516
lines changed

.github/actions/build-dist/action.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: 'Build and upload distribution'
33
runs:
44
using: "composite"
55
steps:
6-
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
6+
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
77
with:
88
node-version: 20
99
cache: npm
@@ -23,7 +23,7 @@ runs:
2323
cp -r sources/dist .
2424
2525
- name: Upload distribution
26-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
26+
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
2727
with:
2828
name: dist
2929
path: dist/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# This file was generated by the Gradle 'init' task.
2+
# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format
Binary file not shown.

.github/workflow-samples/gradle-plugin/gradle/wrapper/gradle-wrapper.properties

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionSha256Sum=8d97a97984f6cbd2b85fe4c60a743440a347544bf18818048e611f5288d46c94
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
3+
distributionSha256Sum=20f1b1176237254a6fc204d8434196fa11a4cfb387567519c61556e8710aed78
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
55
networkTimeout=10000
66
validateDistributionUrl=true
77
zipStoreBase=GRADLE_USER_HOME

.github/workflow-samples/gradle-plugin/gradlew

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ fi
205205
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
206206

207207
# Collect all arguments for the java command:
208-
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
208+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
209209
# and any embedded shellness will be escaped.
210210
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
211211
# treated as '${Hostname}' itself on the command line.

.github/workflow-samples/gradle-plugin/plugin/build.gradle

-60
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
plugins {
2+
`java-gradle-plugin`
3+
}
4+
5+
repositories {
6+
mavenCentral()
7+
}
8+
9+
testing {
10+
suites {
11+
val test by getting(JvmTestSuite::class) {
12+
useJUnitJupiter()
13+
}
14+
15+
val functionalTest by registering(JvmTestSuite::class) {
16+
dependencies {
17+
implementation(project())
18+
}
19+
20+
targets {
21+
all {
22+
testTask.configure { shouldRunAfter(test) }
23+
}
24+
}
25+
}
26+
}
27+
}
28+
29+
gradlePlugin {
30+
val greeting by plugins.creating {
31+
id = "org.example.greeting"
32+
implementationClass = "org.example.GradlePluginPlugin"
33+
}
34+
}
35+
36+
gradlePlugin.testSourceSets.add(sourceSets["functionalTest"])
37+
38+
tasks.named<Task>("check") {
39+
dependsOn(testing.suites.named("functionalTest"))
40+
}
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
* This Java source file was generated by the Gradle 'init' task.
2+
* This source file was generated by the Gradle 'init' task
33
*/
4-
package org.example.gradle.plugin;
4+
package org.example;
55

66
import java.io.File;
77
import java.io.IOException;
@@ -15,7 +15,7 @@
1515
import static org.junit.jupiter.api.Assertions.*;
1616

1717
/**
18-
* A simple functional test for the 'org.example.gradle.plugin.greeting' plugin.
18+
* A simple functional test for the 'org.example.greeting' plugin.
1919
*/
2020
class GradlePluginPluginFunctionalTest {
2121
@TempDir
@@ -29,24 +29,23 @@ private File getSettingsFile() {
2929
return new File(projectDir, "settings.gradle");
3030
}
3131

32-
@Test void canRunTaskWithGradle691() throws IOException {
32+
@Test void canRunTask() throws IOException {
3333
writeString(getSettingsFile(), "");
3434
writeString(getBuildFile(),
3535
"plugins {" +
36-
" id('org.example.gradle.plugin.greeting')" +
36+
" id('org.example.greeting')" +
3737
"}");
3838

3939
// Run the build
4040
GradleRunner runner = GradleRunner.create();
4141
runner.forwardOutput();
42-
runner.withGradleVersion("6.9.1");
4342
runner.withPluginClasspath();
4443
runner.withArguments("greeting");
4544
runner.withProjectDir(projectDir);
4645
BuildResult result = runner.build();
4746

4847
// Verify the result
49-
assertTrue(result.getOutput().contains("Hello from plugin 'org.example.gradle.plugin.greeting'"));
48+
assertTrue(result.getOutput().contains("Hello from plugin 'org.example.greeting'"));
5049
}
5150

5251
private void writeString(File file, String string) throws IOException {
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
* This Java source file was generated by the Gradle 'init' task.
2+
* This source file was generated by the Gradle 'init' task
33
*/
4-
package org.example.gradle.plugin;
4+
package org.example;
55

66
import org.gradle.api.Project;
77
import org.gradle.api.Plugin;
@@ -13,7 +13,7 @@ public class GradlePluginPlugin implements Plugin<Project> {
1313
public void apply(Project project) {
1414
// Register a task
1515
project.getTasks().register("greeting", task -> {
16-
task.doLast(s -> System.out.println("Hello from plugin 'org.example.gradle.plugin.greeting'"));
16+
task.doLast(s -> System.out.println("Hello from plugin 'org.example.greeting'"));
1717
});
1818
}
1919
}
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
/*
2-
* This Java source file was generated by the Gradle 'init' task.
2+
* This source file was generated by the Gradle 'init' task
33
*/
4-
package org.example.gradle.plugin;
4+
package org.example;
55

66
import org.gradle.testfixtures.ProjectBuilder;
77
import org.gradle.api.Project;
88
import org.junit.jupiter.api.Test;
99
import static org.junit.jupiter.api.Assertions.*;
1010

1111
/**
12-
* A simple unit test for the 'org.example.gradle.plugin.greeting' plugin.
12+
* A simple unit test for the 'org.example.greeting' plugin.
1313
*/
1414
class GradlePluginPluginTest {
1515
@Test void pluginRegistersATask() {
1616
// Create a test project and apply the plugin
1717
Project project = ProjectBuilder.builder().build();
18-
project.getPlugins().apply("org.example.gradle.plugin.greeting");
18+
project.getPlugins().apply("org.example.greeting");
1919

2020
// Verify the result
2121
assertNotNull(project.getTasks().findByName("greeting"));

.github/workflow-samples/gradle-plugin/settings.gradle

-12
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
rootProject.name = "gradle-plugin-2"
2+
include("plugin")

.github/workflow-samples/groovy-dsl/build.gradle

+6-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@ repositories {
66
mavenCentral()
77
}
88

9-
dependencies {
10-
testImplementation('junit:junit:4.13.2')
9+
testing {
10+
suites {
11+
test {
12+
useJUnit()
13+
}
14+
}
1115
}
1216

1317
tasks.named("test").configure {
Binary file not shown.

.github/workflow-samples/groovy-dsl/gradle/wrapper/gradle-wrapper.properties

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionSha256Sum=8d97a97984f6cbd2b85fe4c60a743440a347544bf18818048e611f5288d46c94
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
3+
distributionSha256Sum=20f1b1176237254a6fc204d8434196fa11a4cfb387567519c61556e8710aed78
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
55
networkTimeout=10000
66
validateDistributionUrl=true
77
zipStoreBase=GRADLE_USER_HOME

.github/workflow-samples/groovy-dsl/gradlew

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ fi
205205
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
206206

207207
# Collect all arguments for the java command:
208-
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
208+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
209209
# and any embedded shellness will be escaped.
210210
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
211211
# treated as '${Hostname}' itself on the command line.

.github/workflow-samples/java-toolchain/build.gradle renamed to .github/workflow-samples/java-toolchain/build.gradle.kts

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id 'java'
2+
java
33
}
44

55
java {
@@ -12,6 +12,10 @@ repositories {
1212
mavenCentral()
1313
}
1414

15-
dependencies {
16-
testImplementation('junit:junit:4.13.2')
17-
}
15+
testing {
16+
suites {
17+
val test by getting(JvmTestSuite::class) {
18+
useJUnit()
19+
}
20+
}
21+
}
Binary file not shown.

.github/workflow-samples/java-toolchain/gradle/wrapper/gradle-wrapper.properties

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionSha256Sum=8d97a97984f6cbd2b85fe4c60a743440a347544bf18818048e611f5288d46c94
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
3+
distributionSha256Sum=20f1b1176237254a6fc204d8434196fa11a4cfb387567519c61556e8710aed78
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
55
networkTimeout=10000
66
validateDistributionUrl=true
77
zipStoreBase=GRADLE_USER_HOME

.github/workflow-samples/java-toolchain/gradlew

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ fi
205205
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
206206

207207
# Collect all arguments for the java command:
208-
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
208+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
209209
# and any embedded shellness will be escaped.
210210
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
211211
# treated as '${Hostname}' itself on the command line.

.github/workflow-samples/java-toolchain/settings.gradle

-5
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
plugins {
2+
// Apply the foojay-resolver plugin to allow automatic download of JDKs
3+
id("org.gradle.toolchains.foojay-resolver-convention") version "0.9.0"
4+
}
5+
6+
rootProject.name = "java-toolchains"

.github/workflow-samples/kotlin-dsl/build.gradle.kts

+7-5
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@ repositories {
88

99
dependencies {
1010
api("org.apache.commons:commons-math3:3.6.1")
11-
implementation("com.google.guava:guava:33.4.0-jre")
12-
13-
testImplementation("org.junit.jupiter:junit-jupiter:5.11.4")
11+
implementation("com.google.guava:guava:33.4.5-jre")
1412
}
1513

16-
tasks.test {
17-
useJUnitPlatform()
14+
testing {
15+
suites {
16+
val test by getting(JvmTestSuite::class) {
17+
useJUnitJupiter()
18+
}
19+
}
1820
}
1921

2022
tasks.named("test").configure {
Binary file not shown.

.github/workflow-samples/kotlin-dsl/gradle/wrapper/gradle-wrapper.properties

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionSha256Sum=8d97a97984f6cbd2b85fe4c60a743440a347544bf18818048e611f5288d46c94
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
3+
distributionSha256Sum=20f1b1176237254a6fc204d8434196fa11a4cfb387567519c61556e8710aed78
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
55
networkTimeout=10000
66
validateDistributionUrl=true
77
zipStoreBase=GRADLE_USER_HOME

.github/workflow-samples/kotlin-dsl/gradlew

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ fi
205205
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
206206

207207
# Collect all arguments for the java command:
208-
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
208+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
209209
# and any embedded shellness will be escaped.
210210
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
211211
# treated as '${Hostname}' itself on the command line.

.github/workflows/ci-check-and-unit-test.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
steps:
2020
- name: Checkout sources
2121
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
22-
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
22+
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
2323
with:
2424
node-version: 20
2525
cache: npm
@@ -30,7 +30,7 @@ jobs:
3030
env:
3131
ALLOWED_GRADLE_WRAPPER_CHECKSUMS: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 # Invalid wrapper jar used for testing
3232
with:
33-
gradle-version: "8.12.1"
33+
gradle-version: "8.13"
3434

3535
- name: Install npm dependencies
3636
run: |

0 commit comments

Comments
 (0)