Skip to content

Commit

Permalink
Compile to Java 11 and bump all dependency versions
Browse files Browse the repository at this point in the history
  • Loading branch information
thevietto committed Oct 4, 2022
1 parent bbf891a commit 3836b0e
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 36 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 1.8
java-version: 11
- name: Publish
uses: eskatos/gradle-command-action@v1
with:
gradle-version: 7.0.2
gradle-version: 7.5.1
arguments: publish
env:
sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 1.8
java-version: 11
- name: Run Tests
uses: eskatos/gradle-command-action@v1
with:
Expand Down
20 changes: 10 additions & 10 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
version=0.18.0

# Dependencies
coroutine_version=1.6.1
jackson_version=2.12.3
caffeine_version=3.0.2
serialization_version=1.3.1
kDataLoader_version=0.4.0
coroutine_version=1.6.4
jackson_version=2.13.4
caffeine_version=3.1.1
serialization_version=1.4.0
kDataLoader_version=0.5.1
deferredJsonBuilder_version=1.0.0
ktor_version=2.0.0
ktor_version=2.1.2

# Test-Dependencies
kotlin_html_version=0.6.12
netty_version=4.1.42.Final
junit_version=5.7.2
kluent_version=1.65
kotlin_html_version=0.7.5
netty_version=4.1.82.Final
junit_version=5.9.0
kluent_version=1.68
hamcrest_version=2.2


Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
12 changes: 6 additions & 6 deletions kgraphql-example/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
plugins {
base
application
kotlin("jvm") version "1.6.20"
id("org.jetbrains.dokka") version "1.4.32"
kotlin("jvm") version "1.7.10"
id("org.jetbrains.dokka") version "1.7.10"
signing
}

Expand All @@ -17,7 +17,7 @@ val junit_version: String by project
val isReleaseVersion = !version.toString().endsWith("SNAPSHOT")

application {
mainClassName = "io.ktor.server.netty.EngineMain"
mainClass.set("io.ktor.server.netty.EngineMain")
}

dependencies {
Expand All @@ -34,8 +34,8 @@ dependencies {


tasks {
compileKotlin { kotlinOptions { jvmTarget = "1.8" } }
compileTestKotlin { kotlinOptions { jvmTarget = "1.8" } }
compileKotlin { kotlinOptions { jvmTarget = JavaVersion.VERSION_11.toString() } }
compileTestKotlin { kotlinOptions { jvmTarget = JavaVersion.VERSION_11.toString() } }

test {
useJUnitPlatform()
Expand All @@ -44,7 +44,7 @@ tasks {
outputDirectory.set(buildDir.resolve("javadoc"))
dokkaSourceSets {
configureEach {
jdkVersion.set(8)
jdkVersion.set(11)
reportUndocumented.set(true)
platform.set(org.jetbrains.dokka.Platform.jvm)
}
Expand Down
6 changes: 3 additions & 3 deletions kgraphql-ktor/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ dependencies {


tasks {
compileKotlin { kotlinOptions { jvmTarget = "1.8" } }
compileTestKotlin { kotlinOptions { jvmTarget = "1.8" } }
compileKotlin { kotlinOptions { jvmTarget = JavaVersion.VERSION_11.toString() } }
compileTestKotlin { kotlinOptions { jvmTarget = JavaVersion.VERSION_11.toString() } }

test {
useJUnitPlatform()
Expand All @@ -49,7 +49,7 @@ tasks {
outputDirectory.set(buildDir.resolve("javadoc"))
dokkaSourceSets {
configureEach {
jdkVersion.set(8)
jdkVersion.set(11)
reportUndocumented.set(true)
platform.set(org.jetbrains.dokka.Platform.jvm)
}
Expand Down
10 changes: 5 additions & 5 deletions kgraphql/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

plugins {
base
kotlin("jvm") version "1.6.20"
id("org.jetbrains.dokka") version "1.4.32"
kotlin("jvm") version "1.7.10"
id("org.jetbrains.dokka") version "1.7.10"
signing
}

Expand Down Expand Up @@ -47,8 +47,8 @@ dependencies {
}

tasks {
compileKotlin { kotlinOptions { jvmTarget = "1.8" } }
compileTestKotlin { kotlinOptions { jvmTarget = "1.8" } }
compileKotlin { kotlinOptions { jvmTarget = JavaVersion.VERSION_11.toString() } }
compileTestKotlin { kotlinOptions { jvmTarget = JavaVersion.VERSION_11.toString() } }

test {
useJUnitPlatform()
Expand All @@ -57,7 +57,7 @@ tasks {
outputDirectory.set(buildDir.resolve("javadoc"))
dokkaSourceSets {
configureEach {
jdkVersion.set(8)
jdkVersion.set(11)
reportUndocumented.set(true)
platform.set(org.jetbrains.dokka.Platform.jvm)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,12 @@ fun <K, V> CoroutineScope.dataActor(totalTimes: Int, batchLoader: suspend (List<
}

for (msg in channel) {
when (msg) {
is Add<*, *> -> {
msg as Add<K, V>
if (!promiseMap.containsKey(msg.key)) promiseMap[msg.key] = Stack()
promiseMap[msg.key]?.add(msg.result) ?: throw TODO("Couldn't find any '${msg.key}' in map")
log("$counter")
if (--counter == 0) doJoin()
}
if (msg is Add<*, *>) {
msg as Add<K, V>
if (!promiseMap.containsKey(msg.key)) promiseMap[msg.key] = Stack()
promiseMap[msg.key]?.add(msg.result) ?: throw TODO("Couldn't find any '${msg.key}' in map")
log("$counter")
if (--counter == 0) doJoin()
}
}
}
Expand Down

0 comments on commit 3836b0e

Please sign in to comment.