Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
kotlin("jvm") version "1.8.0"
kotlin("jvm") version "1.9.10"
application
id("io.gitlab.arturbosch.detekt") version "1.23.3"
}
Expand All @@ -19,10 +19,22 @@ tasks.test {
useJUnitPlatform()
}

kotlin {
jvmToolchain(11)
// Force a Kotlin JVM target that the Kotlin plugin version understands.
// Kotlin 1.8.x does not recognize JVM target "21", so set a supported target explicitly.
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
// Use JVM target 17 which is supported by this Kotlin plugin.
kotlinOptions.jvmTarget = "17"
}

// Configure Java compilation to target Java 17 as well so Kotlin and Java targets match.
tasks.withType<JavaCompile>().configureEach {
sourceCompatibility = "17"
targetCompatibility = "17"
options.release.set(17)
}

// Use the JDK that Gradle is running with (no explicit toolchain requested).

detekt {
buildUponDefaultConfig = true // preconfigure defaults
allRules = false // activate all available (even unstable) rules.
Expand Down
3 changes: 1 addition & 2 deletions src/main/kotlin/mate/academy/RemoveChars.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package mate.academy

fun removeChars(str: String): String {
// Implement this function
return ""
return str.drop(1).dropLast(1)
}
Loading