Skip to content

Commit

Permalink
Oh Boy, Kotlin 2.0 Support!
Browse files Browse the repository at this point in the history
  • Loading branch information
iNoles committed May 27, 2024
1 parent 11d7e96 commit c5c038e
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 28 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Fuel

[![Kotlin](https://img.shields.io/badge/Kotlin-1.9.21-blue.svg)](http://kotlinlang.org)
[![Kotlin](https://img.shields.io/badge/Kotlin-1.2.0-blue.svg)](http://kotlinlang.org)
[![MavenCentral](https://maven-badges.herokuapp.com/maven-central/com.github.kittinunf.fuel/fuel-jvm/badge.svg)](https://search.maven.org/search?q=com.github.kittinunf.fuel)
[![ktlint](https://img.shields.io/badge/code%20style-%E2%9D%A4-FF4081.svg)](https://ktlint.github.io)
[![Run Gradle Push](https://github.com/kittinunf/fuel/actions/workflows/main.yml/badge.svg)](https://github.com/kittinunf/fuel/actions/workflows/main.yml)
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
kotlin("multiplatform") version "1.9.24" apply false
kotlin("multiplatform") version "2.0.0" apply false
id("org.jetbrains.kotlinx.kover") version "0.8.0" apply false
}

Expand Down
11 changes: 5 additions & 6 deletions fuel-forge-jvm/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
kotlin("jvm")
id("publication")
Expand All @@ -6,6 +8,9 @@ plugins {

kotlin {
explicitApi()
compilerOptions {
jvmTarget.set(JvmTarget.JVM_1_8)
}
}

java {
Expand All @@ -18,12 +23,6 @@ tasks.withType<JavaCompile> {
targetCompatibility = JavaVersion.VERSION_1_8.toString()
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
jvmTarget = "1.8"
}
}

dependencies {
api(project(":fuel"))
api(libs.forge)
Expand Down
11 changes: 5 additions & 6 deletions fuel-jackson-jvm/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
kotlin("jvm")
id("publication")
Expand All @@ -6,6 +8,9 @@ plugins {

kotlin {
explicitApi()
compilerOptions {
jvmTarget.set(JvmTarget.JVM_1_8)
}
}

java {
Expand All @@ -18,12 +23,6 @@ tasks.withType<JavaCompile> {
targetCompatibility = JavaVersion.VERSION_1_8.toString()
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
jvmTarget = "1.8"
}
}

dependencies {
api(project(":fuel"))
api(libs.jackson.module.kotlin)
Expand Down
10 changes: 7 additions & 3 deletions fuel-kotlinx-serialization/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
kotlin("multiplatform")
kotlin("plugin.serialization") version "1.9.24"
kotlin("plugin.serialization") version "2.0.0"
id("publication")
id("org.jetbrains.kotlinx.kover")
}

kotlin {
jvm {
compilations.all {
kotlinOptions.jvmTarget = "1.8"
@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions {
jvmTarget.set(JvmTarget.JVM_1_8)
}
testRuns["test"].executionTask.configure {
useJUnit()
Expand Down
13 changes: 6 additions & 7 deletions fuel-moshi-jvm/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
kotlin("jvm")
id("publication")
id("org.jetbrains.kotlinx.kover")
id("com.google.devtools.ksp") version "1.9.24-1.0.20"
id("com.google.devtools.ksp") version "2.0.0-1.0.21"
}

kotlin {
explicitApi()
compilerOptions {
jvmTarget.set(JvmTarget.JVM_1_8)
}
}

java {
Expand All @@ -19,12 +24,6 @@ tasks.withType<JavaCompile> {
targetCompatibility = JavaVersion.VERSION_1_8.toString()
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
jvmTarget = "1.8"
}
}

dependencies {
api(project(":fuel"))
api(libs.moshi)
Expand Down
17 changes: 13 additions & 4 deletions fuel/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
kotlin("multiplatform")
id("publication")
Expand All @@ -6,8 +9,9 @@ plugins {

kotlin {
jvm {
compilations.all {
kotlinOptions.jvmTarget = "1.8"
@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions {
jvmTarget.set(JvmTarget.JVM_1_8)
}
testRuns["test"].executionTask.configure {
useJUnit()
Expand Down Expand Up @@ -55,13 +59,18 @@ kotlin {

explicitApi()

targets.configureEach {
@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions {
freeCompilerArgs.add("-Xexpect-actual-classes")
}

/*targets.configureEach {
compilations.configureEach {
compilerOptions.configure {
freeCompilerArgs.add("-Xexpect-actual-classes")
}
}
}
}*/

sourceSets {
commonMain {
Expand Down

0 comments on commit c5c038e

Please sign in to comment.