'kotlinOptions' is deprecated

김세준·2024년 1월 4일
0

error

목록 보기
3/3

신규 프로젝트를 생성하면 아무것도 건드리지 않아도 gradle 부분에 deprecated, warning 이 발생합니다.

tasks.withType(KotlinCompile).configureEach {
    kotlinOptions {
        freeCompilerArgs = ['-Xjsr305=strict']
        jvmTarget = '17'
    }
}

관련 링크: https://youtrack.jetbrains.com/issue/KT-27301/Expose-compiler-flags-via-Gradle-lazy-properties#focus=Comments-27-6565858.0-0

deprecated warning 을 없애고 싶다면 아래처럼 코드를 바꿔주시면 됩니다.

tasks.withType(KotlinCompile).configureEach {
    compilerOptions {
        freeCompilerArgs = ['-Xjsr305=strict']
        jvmTarget = JvmTarget.JVM_17
    }
}

0개의 댓글