본문 바로가기
CM/Gradle

gradle8.5 error - A problem occurred evaluating root project / Could not find method publishing() for arguments

by 태하팍 2023. 12. 19.
반응형

아래와 같이 오류가 발생!

오류내용은 아래와 같습니다.

Build file '/Users/teri.epi/Workspaces/AppArchiGuideGrpcProtoBuf/build.gradle' line: 80

A problem occurred evaluating root project 'AppArchiGuideGrpcProtoBuf'.
> Could not find method publishing() for arguments [build_b75x5h20h2167jvjg9tex8or9$_run_closure7@28c0acf5] on root project 'AppArchiGuideGrpcProtoBuf' of type org.gradle.api.Project.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

답은.. id 'maven-publish'를 넣어줘야 합니다..

plugins {
    id 'java'
    id 'org.springframework.boot' version '3.2.0'
    id 'io.spring.dependency-management' version '1.1.4'
    id "com.google.protobuf" version "0.9.4"
    id 'maven-publish'
}

id 'maven-publish'는 Gradle 플러그인으로, Gradle 프로젝트의 아티팩트를 Maven 리포지토리에 배포하는 기능을 제공합니다. maven-publish 플러그인을 적용하면 publishing 블록을 사용하여 프로젝트의 아티팩트를 정의하고 배포할 수 있습니다.

한쌍이였네요..ㅋㅋ

gradle 학습 다시 좀 해야겠네요ㅠㅠ

오류나신분들은 삽질 안하시고 후딱 하기길 바라며..:)

  - 끝 -

반응형