파일 위치 변경 - gradle 버전 일치 에러

이리·2024년 8월 21일
0
post-thumbnail

평소 정리하지 않는 습관으로… 이제와서 바탕화면 정리하다 내부 파일 경로가 문제가된건지 test 실행 시 gradle 버전일치 에러가 발생했습니다.

Execution failed for task ':test'.

There were failing tests. See the report at: file:///Users/ㅁㅁㅁㅁ/ㅁㅁㅁㅁ/BE/secserver/build/reports/tests/test/index.html

Try:

Run with --scan to get full insights.
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.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 967ms
4 actionable tasks: 3 executed, 1 up-to-date

⇒ 빌드 시 Deprecated 된 기능들이 있어서 현재의 gradle과 호환이 맞지 않다는 메시지입니다


해결

< 해결 방법 >

🔑 File > settings... 클릭 Gradle 검색 후 'Gradle'을 전부 'IntelliJ IDEA' 로 변경  →  'Apply' 버튼 클릭  → 'OK' 버튼 클릭

⇒ IntelliJ는 Gradle 프로젝트를 빌드하고 실행할때 두가지 모드 중 하나를 선택할 수 있음

  • Gradle에서 직접 빌드 : Gradle이 자체적으로 모든 빌드와 테스트를 수행 → 프로젝트 Gradle이 최신 버전과 Gradle이 호환되지 않을 경우 Deprecated된 기능을 포함하고 있을때 에러 발생

  • IntelliJ에서 빌드 : IntelliJ가 자체적으로 빌드 및 테스트 작업 수행 IntelliJ의 최신 빌드 도구와 설정을 활용해 Gradle과 호환성 문제를 회피할 수 있음 → Deprecated 문제 발생 X

< 해결 원리 >

Gradle에서 직접 빌드는 프로젝트의 Gradle 설정을 철저히 따르기 때문에, Gradle 버전 불일치나 Deprecated된 기능이 문제를 일으킬 수 있습니다.

IntelliJ IDEA에서 빌드는 IntelliJ의 내장된 빌드 시스템을 사용하여 프로젝트를 빌드하므로, Gradle의 Deprecated된 기능이나 버전 문제에서 비교적 자유로울 수 있습니다.

따라서, IntelliJ IDEA에서 빌드 설정을 변경하여 Gradle 대신 IntelliJ 자체 빌드 시스템을 사용하도록 함으로써, Gradle과 관련된 호환성 문제를 피할 수 있었던 것입니다.

이 설정 변경이 근본적인 문제를 해결한 것은 아니지만, 빌드와 테스트 작업을 정상적으로 진행할 수 있도록 도와준 것입니다. 이후에도 Gradle 관련 문제를 근본적으로 해결하려면, Gradle 스크립트를 최신 버전에 맞게 수정하고 Deprecated된 기능들을 대체해야 합니다.


참고 링크 : https://firstws.tistory.com/23

profile
Bonjour!

0개의 댓글