Skip to content

Commit

Permalink
Upgrade Kotlin and other libraries (#469)
Browse files Browse the repository at this point in the history
* Upgrade Kotlin to 1.9.20

* Upgrade other libraries
  • Loading branch information
gnawf committed Nov 8, 2023
1 parent 2aa3b81 commit dd056c3
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 23 deletions.
19 changes: 13 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
import java.text.SimpleDateFormat

plugins {
id "org.jetbrains.kotlin.jvm" version "1.6.10"
id "org.jetbrains.kotlin.jvm" version "1.9.20"
id "com.jfrog.artifactory" version "4.29.2"
id "biz.aQute.bnd.builder" version "6.3.1"
id "com.bnorm.power.kotlin-power-assert" version "0.11.0"
id "com.bnorm.power.kotlin-power-assert" version "0.13.0"
}

if (JavaVersion.current() != JavaVersion.VERSION_11) {
def msg = String.format("This build must be run with Java 11 - you are running %s - Gradle finds the JDK via JAVA_HOME=%s",
JavaVersion.current(), System.getenv("JAVA_HOME"))
throw new GradleException(msg)
allprojects {
java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
}
}
kotlin {
jvmToolchain {
languageVersion = JavaLanguageVersion.of(11)
}
}
}

def getDevelopmentVersion() {
Expand Down
19 changes: 8 additions & 11 deletions lib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,16 @@ dependencies {

api(kotlin("stdlib"))
api(kotlin("reflect"))
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0")
api("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:1.6.0")
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
api("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:1.7.3")

testImplementation("org.slf4j:slf4j-simple:$slf4jVersion")
testImplementation("com.fasterxml.jackson.core:jackson-databind:2.9.6")
testImplementation("org.openjdk.jmh:jmh-core:1.21")
testImplementation("org.openjdk.jmh:jmh-generator-annprocess:1.21")
testImplementation("com.google.guava:guava:28.0-jre")
testImplementation("io.kotest:kotest-runner-junit5:5.1.0")
testImplementation("io.kotest:kotest-framework-datatest:5.1.0")
testImplementation("io.mockk:mockk:1.12.3")
testImplementation("com.fasterxml.jackson.core:jackson-databind:2.15.3")
testImplementation("org.openjdk.jmh:jmh-core:1.37")
testImplementation("org.openjdk.jmh:jmh-generator-annprocess:1.37")
testImplementation("io.kotest:kotest-runner-junit5:5.8.0")
testImplementation("io.kotest:kotest-framework-datatest:5.8.0")
testImplementation("io.mockk:mockk:1.13.8")
}

// compileJava.source file("build/generated-src"), sourceSets.main.java
Expand All @@ -51,8 +50,6 @@ tasks.withType<KotlinCompile>().configureEach {
"-Xjvm-default=all",
)
}
sourceCompatibility = JavaVersion.VERSION_11.toString()
targetCompatibility = JavaVersion.VERSION_11.toString()
}

configure<PowerAssertGradleExtension> {
Expand Down
6 changes: 3 additions & 3 deletions lib/src/test/kotlin/graphql/nadel/test/Mocking.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ inline fun <reified T : Any> mock(
MockKDsl.internalMockk(
name,
relaxed,
*moreInterfaces,
moreInterfaces,
relaxUnitFun = relaxUnitFun,
block = block
)
Expand All @@ -44,7 +44,7 @@ inline fun <reified T : Any> spy(
): T = MockK.useImpl {
MockKDsl.internalSpyk(
name,
*moreInterfaces,
moreInterfaces,
recordPrivateCalls = recordPrivateCalls,
block = block
)
Expand All @@ -67,7 +67,7 @@ inline fun <reified T : Any> spy(
MockKDsl.internalSpyk(
objToCopy,
name,
*moreInterfaces,
moreInterfaces,
recordPrivateCalls = recordPrivateCalls,
block = block
)
Expand Down
4 changes: 1 addition & 3 deletions test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies {
testImplementation("org.reflections:reflections:0.9.12")
testImplementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.9.6")
testImplementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.9.6")
testImplementation("io.kotest:kotest-runner-junit5:5.1.0")
testImplementation("io.kotest:kotest-runner-junit5:5.8.0")
testImplementation("io.strikt:strikt-jvm:0.31.0")
testImplementation("org.yaml:snakeyaml:1.30")
}
Expand All @@ -32,6 +32,4 @@ tasks.withType<KotlinCompile>().configureEach {
"-Xjvm-default=all",
)
}
sourceCompatibility = JavaVersion.VERSION_11.toString()
targetCompatibility = JavaVersion.VERSION_11.toString()
}

0 comments on commit dd056c3

Please sign in to comment.