LoginSignup
4
3

More than 3 years have passed since last update.

build.gradle.ktsでdevelopmentOnlyが使えなかった・・・

Posted at

経緯

リファレンス見ながらSpring Bootの勉強中
https://docs.spring.io/spring-boot/docs/2.2.2.RELEASE/reference/htmlsingle/#using-boot-devtools

devtoolsを入れるとクラス変更したときに勝手に再起動してくれるっぽい

そーいや入れてなかったな・・・

リファレンスだと

configurations {
    developmentOnly
    runtimeClasspath {
        extendsFrom developmentOnly
    }
}
dependencies {
    developmentOnly("org.springframework.boot:spring-boot-devtools")
}

ほほーん

よっしゃいっちょ書いてみるかー

image.png

おや・・・?

build.gradleとbuild.gradle.ktsとで書き方が違うっぽい

元々Spring Initialzrでもkotlinだとエラーになってたっぽいね
issue挙げられてた

image.png

いえーい

4
3
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3