Skip to content

Commit

Permalink
Merge pull request #34 from usefulness/updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszkwiecinski authored Nov 20, 2023
2 parents 286d206 + 6c6fb8b commit 11359fd
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ allprojects {
}
}
kotlin {
jvmToolchain(21)
jvmToolchain(libs.versions.java.compilation.get().toInteger())
}
}
pluginManager.withPlugin("java") {
Expand Down
1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[versions]
java-compilation = "21"
gradle-starter = "0.66.0"
gradle-pluginpublish = "1.2.1"
gradle-doctor = "0.9.0"
Expand Down
5 changes: 3 additions & 2 deletions gradle/plugins/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinCompile

plugins {
Expand All @@ -6,15 +7,15 @@ plugins {
}

kotlin {
jvmToolchain(21)
jvmToolchain(libs.versions.java.compilation.get().toInteger())
}

def targetJavaVersion = JavaVersion.VERSION_11
tasks.withType(JavaCompile).configureEach {
options.release.set(targetJavaVersion.majorVersion.toInteger())
}
tasks.withType(KotlinCompile).configureEach {
kotlinOptions.jvmTarget = targetJavaVersion
it.compilerOptions.jvmTarget = JvmTarget.@Companion.fromTarget(targetJavaVersion.toString())
}

dependencies {
Expand Down
10 changes: 6 additions & 4 deletions licensee-for-android-core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
alias(libs.plugins.starter.library.kotlin)
Expand All @@ -19,16 +21,16 @@ poko {

def targetVersion = JavaVersion.VERSION_1_8
tasks.withType(KotlinCompile).configureEach {
it.kotlinOptions.jvmTarget = targetVersion.toString()
it.compilerOptions.jvmTarget = JvmTarget.@Companion.fromTarget(targetVersion.toString())
}
tasks.withType(JavaCompile).configureEach {
it.options.release.set(targetVersion.majorVersion.toInteger())
}

tasks.withType(KotlinCompile).configureEach {
kotlinOptions {
apiVersion = "1.8"
languageVersion = "1.8"
compilerOptions {
apiVersion = KotlinVersion.KOTLIN_1_8
languageVersion = KotlinVersion.KOTLIN_1_8
}
}
tasks.withType(Test).configureEach {
Expand Down

0 comments on commit 11359fd

Please sign in to comment.