f-lab-edu / TheCamp

0 stars 2 forks source link

Gradle Build 시 경고문 발생 #5

Open jinyeanseok opened 1 year ago

jinyeanseok commented 1 year ago
buildscript {
    // ext : build.gradle 에서 사용 하는 전역 변수를 설정.
    ext {
        springBootVersion = '3.1.3'
    }
    repositories { // 각종 의존성들을 어떤 원격 저장소에서 받을지 contact
        mavenCentral()
    }
    dependencies {
        // springBoot gradle plugin 3.1.3 RELEASE를 의존성으로 받음.
        classpath "org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}"
        classpath "io.spring.gradle:dependency-management-plugin:1.1.3.RELEASE"
    }
}

subprojects {
    group 'com.reservation.camping'
    version '1.0'

    apply plugin: 'java'
    apply plugin: 'org.springframework.boot'
    apply plugin: 'io.spring.dependency-management'

    sourceCompatibility = 17

    repositories {
        mavenCentral()
    }

}

project(':app') {
    bootJar.enabled = false
    jar.enabled = true
}

build run............

$ ./gradlew                                       

> Task :help

For troubleshooting, visit https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.2/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD SUCCESSFUL in 2s
1 actionable task: 1 executed
jinyeanseok commented 1 year ago

https://coderanch.com/t/773323/gradle/build-tools/Deprecated-Gradle-features-build-making

https://github.com/spring-io/initializr/issues/1420

위의 링크에 따라

./gradlew --warning-mode all

실헹 후


`
$ ./gradlew --warning-mode all
`

> Configure project :
Build file 'C:\git\TheCamp\build.gradle': line 24
The org.gradle.api.plugins.JavaPluginConvention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2/userguide/upgrading_version_8.
html#java_convention_deprecation
        at build_7vdftk62fzb1pqme8lsfj2i4q$_run_closure1.doCall(C:\git\TheCamp\build.gradle:24)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)
        at build_7vdftk62fzb1pqme8lsfj2i4q.run(C:\git\TheCamp\build.gradle:16)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)
Build file 'C:\git\TheCamp\build.gradle': line 24
The org.gradle.api.plugins.Convention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2/userguide/upgrading_version_8.html#depre
cated_access_to_conventions
        at build_7vdftk62fzb1pqme8lsfj2i4q$_run_closure1.doCall(C:\git\TheCamp\build.gradle:24)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)
        at build_7vdftk62fzb1pqme8lsfj2i4q.run(C:\git\TheCamp\build.gradle:16)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)

using sourceCompatibility은 더 이상 사용되지 않으며 Gradle 9.x에서 제거되도록 표시되었기에 해당 코드 삭제.