Skip to content

Commit

Permalink
chore(main): Handle upcoming Gradle deprecations (#419)
Browse files Browse the repository at this point in the history
  • Loading branch information
HorizonNet authored Dec 6, 2023
1 parent a0ea97b commit 95152e6
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gradle-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Set up JDK 17
uses: actions/[email protected]
with:
java-version: '17'
java-version-file: .java-version
distribution: 'temurin'
server-id: github
settings-path: ${{ github.workspace }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ jobs:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}

- name: Set up JDK 17
- name: Set up JDK
uses: actions/[email protected]
with:
java-version: '17'
java-version-file: .java-version
distribution: 'temurin'

- name: Build with Gradle
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Set up JDK 17
uses: actions/[email protected]
with:
java-version: '17'
java-version-file: .java-version
distribution: 'temurin'

- name: Cache SonarCloud packages
Expand All @@ -51,7 +51,7 @@ jobs:
- name: Set up JDK 17
uses: actions/[email protected]
with:
java-version: '17'
java-version-file: .java-version
distribution: 'temurin'

- name: Analyze
Expand Down
1 change: 1 addition & 0 deletions .java-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
17.0.9
15 changes: 11 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ buildscript {
ext.versions_version = '0.50.0'
ext.sonarqube_version = '4.4.1.3373'
ext.slf4j_version = '2.0.9'
ext.java_version = '17'
ext.junit_version = '5.10.1'
ext.junit_platform_launcher_version = '1.10.1'

ext.org_jetbrains_kotlin = 'org.jetbrains.kotlin'
}
Expand All @@ -25,12 +26,15 @@ plugins {
id 'com.github.ben-manes.versions' version "$versions_version"
id 'org.sonarqube' version "$sonarqube_version"
id 'jacoco'
id 'java'
}

group 'com.ultratendency.kafka.ldap'
version '2.1.1' // x-release-please-version

sourceCompatibility = "$java_version"
java {
sourceCompatibility = JavaVersion.VERSION_17
}

test {
useJUnitPlatform {
Expand Down Expand Up @@ -62,17 +66,19 @@ dependencies {
testRuntimeOnly("org.spekframework.spek2:spek-runner-junit5:$spek_version") {
exclude group: "$org_jetbrains_kotlin"
}
testImplementation "org.junit.jupiter:junit-jupiter:$junit_version"
testRuntimeOnly "org.junit.platform:junit-platform-launcher:$junit_platform_launcher_version"
}

configurations.all {
exclude group: 'org.slf4j', module: 'slf4j-log4j12'
}

compileKotlin {
kotlinOptions.jvmTarget = "$java_version"
kotlinOptions.jvmTarget = JavaVersion.VERSION_17.toString()
}
compileTestKotlin {
kotlinOptions.jvmTarget = "$java_version"
kotlinOptions.jvmTarget = JavaVersion.VERSION_17.toString()
}

test {
Expand Down Expand Up @@ -129,6 +135,7 @@ sonarqube {
property 'sonar.host.url', 'https://sonarcloud.io'
property 'sonar.coverage.jacoco.xmlReportPaths',
"${project.buildDir}/reports/jacoco/test/jacocoTestReport.xml"
property 'sonar.gradle.skipCompile', true
}
}

Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
systemProp.sonar.gradle.skipCompile=true

0 comments on commit 95152e6

Please sign in to comment.