Skip to content

Commit 01b880c

Browse files
committed
Update gradle to 7.4, add jdk17 to GitHub actions
1 parent ea705cc commit 01b880c

File tree

5 files changed

+53
-52
lines changed

5 files changed

+53
-52
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# The workflow to check master after push or pull request.
2+
name: Master and pull request checks
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
jobs:
9+
build:
10+
strategy:
11+
matrix:
12+
java-version: [ 11, 17 ]
13+
runs-on: [ ubuntu-latest ]
14+
name: Build on ${{ matrix.runs-on }} with jdk ${{ matrix.java-version }}
15+
runs-on: ${{ matrix.runs-on }}
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v2
19+
- name: Set up JDK ${{ matrix.java-version }}
20+
uses: actions/setup-java@v2
21+
with:
22+
java-version: ${{ matrix.java-version }}
23+
distribution: 'temurin'
24+
cache: gradle
25+
- name: Build with Gradle
26+
run: ./gradlew build

.github/workflows/master_push_workflow.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/pull_request_workflow.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

build.gradle

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
16+
import org.gradle.util.DistributionLocator
17+
import org.gradle.util.GradleVersion
1718
import org.gradle.util.VersionNumber
1819

1920
plugins {
@@ -34,15 +35,15 @@ plugins {
3435
}
3536

3637
repositories {
37-
jcenter()
38+
mavenCentral()
3839
}
3940

4041
sourceCompatibility = JavaVersion.VERSION_11
4142
targetCompatibility = JavaVersion.VERSION_11
4243

4344
ext {
4445
kafkaVersion = "2.0.1"
45-
testcontainersVersion = "1.15.1"
46+
testcontainersVersion = "1.16.3"
4647
debeziumVersion = "1.3.0.Final"
4748
}
4849

@@ -55,11 +56,24 @@ distributions {
5556
}
5657
}
5758

59+
wrapper {
60+
distributionType = 'ALL'
61+
doLast {
62+
final DistributionLocator locator = new DistributionLocator()
63+
final GradleVersion version = GradleVersion.version(wrapper.gradleVersion)
64+
final URI distributionUri = locator.getDistributionFor(version, wrapper.distributionType.name().toLowerCase(Locale.ENGLISH))
65+
final URI sha256Uri = new URI(distributionUri.toString() + ".sha256")
66+
final String sha256Sum = new String(sha256Uri.toURL().bytes)
67+
wrapper.getPropertiesFile() << "distributionSha256Sum=${sha256Sum}\n"
68+
println "Added checksum to wrapper properties"
69+
}
70+
}
71+
5872
sourceSets {
5973
integrationTest {
6074
java.srcDir file('src/integration-test/java')
6175
resources.srcDir file('src/integration-test/resources')
62-
compileClasspath += sourceSets.main.output + configurations.testRuntime
76+
compileClasspath += sourceSets.main.output + configurations.testRuntimeClasspath
6377
runtimeClasspath += output + compileClasspath
6478
}
6579
}
@@ -73,24 +87,24 @@ idea {
7387

7488
configurations {
7589
integrationTestImplementation.extendsFrom testImplementation
76-
integrationTestRuntime.extendsFrom testRuntime
90+
integrationTestRuntime.extendsFrom testRuntimeOnly
7791
}
7892

7993
dependencies {
8094
compileOnly "org.apache.kafka:connect-api:$kafkaVersion"
8195
compileOnly "io.debezium:debezium-api:$debeziumVersion"
8296

83-
implementation "org.slf4j:slf4j-api:1.7.25"
97+
implementation "org.slf4j:slf4j-api:1.7.33"
8498

85-
testImplementation "org.junit.jupiter:junit-jupiter:5.5.1"
86-
testImplementation "org.hamcrest:hamcrest:2.1"
99+
testImplementation "org.junit.jupiter:junit-jupiter:5.8.2"
100+
testImplementation "org.hamcrest:hamcrest:2.2"
87101
testImplementation "org.apache.kafka:connect-api:$kafkaVersion"
88102
testImplementation "org.testcontainers:junit-jupiter:$testcontainersVersion"
89103
testImplementation "io.debezium:debezium-api:$debeziumVersion"
90104

91-
testRuntime "org.apache.logging.log4j:log4j-slf4j-impl:2.12.1"
92-
testRuntime "org.apache.logging.log4j:log4j-api:2.12.1"
93-
testRuntime "org.apache.logging.log4j:log4j-core:2.12.1"
105+
testRuntimeOnly "org.apache.logging.log4j:log4j-slf4j-impl:2.17.1"
106+
testRuntimeOnly "org.apache.logging.log4j:log4j-api:2.17.1"
107+
testRuntimeOnly "org.apache.logging.log4j:log4j-core:2.17.1"
94108

95109
integrationTestImplementation "org.apache.kafka:connect-api:$kafkaVersion"
96110
integrationTestImplementation("org.apache.kafka:connect-runtime:$kafkaVersion") {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionSha256Sum=b13f5d97f08000996bf12d9dd70af3f2c6b694c2c663ab1b545e9695562ad1ee
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.1-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
54
zipStoreBase=GRADLE_USER_HOME
65
zipStorePath=wrapper/dists
6+
distributionSha256Sum=cd5c2958a107ee7f0722004a12d0f8559b4564c34daad7df06cffd4d12a426d0

0 commit comments

Comments
 (0)