Skip to content

Commit

Permalink
Build with Java 17
Browse files Browse the repository at this point in the history
  • Loading branch information
corneil committed Mar 7, 2024
1 parent bfab116 commit 4f30d67
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 22 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ jobs:
- name: Set up JDK 11 for ${{ steps.parameters.outputs.arch }}
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'zulu'
# architecture: ${{ steps.parameters.outputs.arch }}
cache: gradle
- name: 'Build'
shell: bash
run: |
Expand Down
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 22 additions & 19 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ dependencies {
}

java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

apply plugin: 'kotlinx-atomicfu'
Expand Down Expand Up @@ -143,21 +143,29 @@ tasks.withType(KotlinTest).configureEach {
}

def rootDir = rootProject.projectDir.path
dokkaHtml {
onlyIf { (hasProperty('dokka') ?: 'false').asBoolean() }
dokkaSourceSets {
configureEach {
samples.from(
"$rootDir/src/commonTest/kotlin/io/jumpco/open/kfsm/example/TurnstileTypes.kt",
"$rootDir/src/commonTest/kotlin/io/jumpco/open/kfsm/example/ImmutableLockFSM.kt",
"$rootDir/src/commonTest/kotlin/io/jumpco/open/kfsm/example/LockTypes.kt",
"$rootDir/src/commonTest/kotlin/io/jumpco/open/kfsm/example/PayingTurnstileTypes.kt",
"$rootDir/src/commonTest/kotlin/io/jumpco/open/kfsm/example/SecureTurnstile.kt"
)

if('true' == project.findProperty('dokka')) {
logger.lifecycle("dokkaHtml")
dokkaHtml {
dokkaSourceSets {
configureEach {
samples.from(
"$rootDir/src/commonTest/kotlin/io/jumpco/open/kfsm/example/TurnstileTypes.kt",
"$rootDir/src/commonTest/kotlin/io/jumpco/open/kfsm/example/ImmutableLockFSM.kt",
"$rootDir/src/commonTest/kotlin/io/jumpco/open/kfsm/example/LockTypes.kt",
"$rootDir/src/commonTest/kotlin/io/jumpco/open/kfsm/example/PayingTurnstileTypes.kt",
"$rootDir/src/commonTest/kotlin/io/jumpco/open/kfsm/example/SecureTurnstile.kt"
)
}
}
inputs.dir('src/commonTest/kotlin')
}
inputs.dir('src/commonTest/kotlin')
} else {
dokkaHtml.onlyIf { false }
}
dokkaJavadoc.onlyIf { false }
dokkaJekyll.onlyIf { false }
dokkaGfm.onlyIf { false }

tasks.register('copyPng', Copy) {
from(projectDir) {
Expand Down Expand Up @@ -229,8 +237,3 @@ kfsmViz {
output = 'packet-reader-detail'
}
}

dokkaJavadoc.onlyIf { false }
dokkaJekyll.onlyIf { false }
dokkaGfm.onlyIf { false }

0 comments on commit 4f30d67

Please sign in to comment.