Updated major version, updated to support kotlin 1.7.20

master
Robinson 2022-11-11 23:24:02 +01:00
parent b38d7838f7
commit 27f7b8f4fe
No known key found for this signature in database
GPG Key ID: 8E7DB78588BD6F5C
3 changed files with 7 additions and 11 deletions

View File

@ -27,14 +27,14 @@ plugins {
id("com.dorkbox.VersionUpdate") version "2.4"
id("com.dorkbox.GradleUtils") version "2.14"
kotlin("jvm") version "1.5.21"
kotlin("jvm") version "1.7.20"
}
object Extras {
// set for the project
const val description = "Gradle Plugin to manage various Gradle tasks, such as updating gradle and dependencies"
const val group = "com.dorkbox"
const val version = "2.17"
const val version = "3.0"
// set as project.ext
const val name = "Gradle Utils"
@ -85,7 +85,7 @@ dependencies {
compileOnly("org.jetbrains.kotlin:kotlin-gradle-plugin")
// for parsing JSON
implementation("org.json:json:20211205")
implementation("org.json:json:20220924")
// for parsing version information from maven
implementation("com.dorkbox:Version:2.4")

View File

@ -547,6 +547,8 @@ open class StaticMethodsAndTools(private val project: Project) {
// in case we cannot parse it from the plugin, provide a reasonable default (the latest stable)
defaultKotlinVersion
}
// NOTE: these must be anonymous inner classes because gradle cannot handle this in kotlin 1.5
project.tasks.withType(JavaCompile::class.java, object: Action<Task> {
override fun execute(task: Task) {
@ -604,8 +606,6 @@ open class StaticMethodsAndTools(private val project: Project) {
}
})
task.sourceCompatibility = kotlinJavaVer
task.targetCompatibility = kotlinJavaVer
task.kotlinOptions.jvmTarget = kotlinJavaVer

View File

@ -249,10 +249,8 @@ class JavaXConfiguration(javaVersion: JavaVersion, private val project: Project,
override fun execute(t: KotlinCompile) {
t.dependsOn(compileMainKotlin)
t.sourceCompatibility = ver
t.targetCompatibility = ver
t.kotlinOptions.jvmTarget = ver
// must be the same module name as the regular one (which is the project name). If it is a different name, it crashes at runtime
t.kotlinOptions.moduleName = project.name
}
@ -262,10 +260,8 @@ class JavaXConfiguration(javaVersion: JavaVersion, private val project: Project,
override fun execute(t: KotlinCompile) {
t.dependsOn(compileTestKotlin)
t.sourceCompatibility = ver
t.targetCompatibility = ver
t.kotlinOptions.jvmTarget = ver
// must be the same module name as the regular one (which is the project name). If it is a different name, it crashes at runtime
t.kotlinOptions.moduleName = project.name
}