Hello have somebody maybe already a spring boot st...
# spring
m
Hello have somebody maybe already a spring boot starter with kotlin
1.4.21
and spring
2.4.1
on place.. with kotlin gradle .
kts
I am new in gradle
but it's Kotlin MPP (fullstack JS/JVM)
m
thx. I take a look…
m
thx. I stumble to create (I have to correct my self.)
spring boot auto configuration
project with
kotlin
and
gradle.kts
I think I have to reset my self… and start over again 🙂. to get the basic for gradle first.
I have a solution some how….
Copy code
e: /Users/morpheus/dev/github/kboot-spring-boot-starter/kboot-spring-boot-starter-autoconfigure/src/main/kotlin/ch/keepcalm/exception/ExceptionTranslator.kt: (136, 21): Calls to static methods in Java interfaces are prohibited in JVM target 1.6. Recompile with '-jvm-target 1.8'
e: /Users/morpheus/dev/github/kboot-spring-boot-starter/kboot-spring-boot-starter-autoconfigure/src/main/kotlin/ch/keepcalm/exception/ExceptionTranslator.kt: (202, 39): Super calls to Java default methods are prohibited in JVM target 1.6. Recompile with '-jvm-target 1.8'

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':kboot-spring-boot-starter-autoconfigure:compileKotlin'.
> Compilation error. See log for more details
The following
issue
I fixed now with the following configuration
Copy code
tasks.withType<KotlinCompile> {
        println("Configuring KotlinCompile  $name in project ${project.name}...")
        kotlinOptions {
            languageVersion = "1.4"
            apiVersion = "1.4"
            jvmTarget = "11"
            freeCompilerArgs = listOf("-Xjsr305=strict")
        }
    }
Copy code
BUILD SUCCESSFUL in 1s
16 actionable tasks: 10 executed, 6 up-to-date
❯ gradle build publishToMavenLocal
Starting a Gradle Daemon, 1 stopped Daemon could not be reused, use --status for details

> Configure project :
Enabling Java plugin in project kboot-spring-boot-starter...
Enabling maven-publish plugin in project kboot-spring-boot-starter...
Enabling Kotlin Spring plugin in project kboot-spring-boot-starter...
Enabling Java plugin in project kboot-spring-boot-starter-autoconfigure...
Enabling maven-publish plugin in project kboot-spring-boot-starter-autoconfigure...
Enabling Kotlin Spring plugin in project kboot-spring-boot-starter-autoconfigure...

> Configure project :kboot-spring-boot-starter-autoconfigure
Configuring KotlinCompile  compileKotlin in project kboot-spring-boot-starter-autoconfigure...
Configuring KotlinCompile  compileTestKotlin in project kboot-spring-boot-starter-autoconfigure...

BUILD SUCCESSFUL in 5s
16 actionable tasks: 6 executed, 10 up-to-date
╭─   ~/dev/github/kboot-spring-boot-starter   master !1 ?1 ·······
BUT
in the
Intellij
I have the following Problems…
the all setup look a bit over-engineer for me.. 🙂 and also this Intellij Errors looks for me strange 🙂
but at leas it looks like it works 🙂
🙂 I Rollback to maven… 🙂 https://github.com/marzelwidmer/kboot-jwt-spring-boot-starter inspiration of Starbucks..
🙂 finally I get it running with Gradle too 🙂 https://github.com/marzelwidmer/kboot-starter