Skip to content

Commit

Permalink
feat(gradle): Tweak a step to make jooqx support multiple java versions
Browse files Browse the repository at this point in the history
  • Loading branch information
zero88 committed Jun 21, 2024
1 parent a68b480 commit ec1aa7d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/jooqx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,17 @@ jobs:
needs: [ context, build, analysis ]
if: needs.context.outputs.shouldPublish == 'true' || needs.context.outputs.isRelease == 'true'
uses: zero88/shared-ghactions/.github/workflows/gradle-publish.yml@main
strategy:
matrix:
java: [ '8', '17' ]
os: [ 'ubuntu-latest' ]
with:
profile: 'jooqx'
version: ${{ needs.context.outputs.version }}
semanticVersion: ${{ needs.context.outputs.semanticVersion }}
hashVersion: ${{ needs.context.outputs.commitId }}
isRelease: ${{ needs.context.outputs.isRelease }}
javaVersion: 17
javaVersion: ${{ matrix.java }}
secrets:
ossrhUser: ${{ secrets.OSS_SONATYPE_USER }}
ossrhToken: ${{ secrets.OSS_SONATYPE_PASSWORD }}
Expand Down
10 changes: 10 additions & 0 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,14 @@ tasks {
testFixturesJavadoc {
title = "jOOQx Testing ${project.version} API"
}

withType<Jar> {
// need to override in here, since at root project, test-fixtures is not yet recognized
if (name == "testFixturesJar") {
when (JavaVersion.current().majorVersion) {
"8" -> archiveClassifier.set("test-fixtures-jvm8")
"11" -> archiveClassifier.set("test-fixtures-jvm11")
}
}
}
}

0 comments on commit ec1aa7d

Please sign in to comment.