4
0
Fork 0
mirror of https://github.com/Anvilcraft/modpacktools synced 2024-06-10 22:49:26 +02:00

kotlin 1.4!!!

This commit is contained in:
LordMZTE 2020-08-15 18:01:38 +02:00
parent 0f3a824390
commit 3d4a9c8359
2 changed files with 3 additions and 9 deletions

View file

@ -22,7 +22,7 @@ plugins {
id("application") id("application")
id("idea") id("idea")
id("maven-publish") id("maven-publish")
id("org.jetbrains.kotlin.jvm") version "1.3.72" id("org.jetbrains.kotlin.jvm") version "1.4.0"
id("org.jetbrains.dokka") version "1.4.0-rc" id("org.jetbrains.dokka") version "1.4.0-rc"
id("org.jlleitschuh.gradle.ktlint") version "9.3.0" id("org.jlleitschuh.gradle.ktlint") version "9.3.0"
} }
@ -45,9 +45,8 @@ dependencies {
"ley.anvil:addonscript:1.0-SNAPSHOT", "ley.anvil:addonscript:1.0-SNAPSHOT",
//Kotlin //Kotlin
"org.jetbrains.kotlin:kotlin-reflect:1.3.72", "org.jetbrains.kotlin:kotlin-reflect:1.4.0",
"org.jetbrains.kotlin:kotlin-stdlib-jdk8", "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.0",
"org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:1.3.8",
//IO //IO
"com.squareup.okhttp3:okhttp:4.8.1", //HTTP client "com.squareup.okhttp3:okhttp:4.8.1", //HTTP client
@ -81,8 +80,6 @@ val kOptions = {obj: GroovyObject ->
obj.withGroovyBuilder { obj.withGroovyBuilder {
"kotlinOptions" { "kotlinOptions" {
setProperty("jvmTarget", "1.8") setProperty("jvmTarget", "1.8")
//without this option, kotlin interfaces dont support default methods in java (will be changed in kt 1.4)
setProperty("freeCompilerArgs", arrayOf("-Xjvm-default=compatibility"))
} }
} }
} }

View file

@ -25,21 +25,18 @@ interface ICommand {
/** /**
* This message will be displayed in the help dialog * This message will be displayed in the help dialog
*/ */
@JvmDefault
val helpMessage: String val helpMessage: String
get() = "" get() = ""
/** /**
* If this command needs the config file to be present. the command will not run if this returns true and there is no config file * If this command needs the config file to be present. the command will not run if this returns true and there is no config file
*/ */
@JvmDefault
val needsConfig: Boolean val needsConfig: Boolean
get() = true get() = true
/** /**
* If this returns true, the command will not run if the modpackjson file doesnt exist * If this returns true, the command will not run if the modpackjson file doesnt exist
*/ */
@JvmDefault
val needsModpackjson: Boolean val needsModpackjson: Boolean
get() = true get() = true
} }