Files
llm-wiki/raw/official-docs/errorprone-gradle-plugin-readme.md

7.0 KiB

title, source_type, url, archive_url, related_branches, related_projects, tags, created
title source_type url archive_url related_branches related_projects tags created
gradle-errorprone-plugin README — net.ltgt.errorprone 공식 플러그인 레퍼런스 official-doc https://github.com/tbroyer/gradle-errorprone-plugin https://web.archive.org/web/2026/https://github.com/tbroyer/gradle-errorprone-plugin
feature-static-analysis-quality-contract
ca-skeleton
official-doc
ca-skeleton
ci-cd
gradle
errorprone
static-analysis
2026-06-15

gradle-errorprone-plugin README — net.ltgt.errorprone 공식 플러그인 레퍼런스

Layer: raw/official-docs/ — tbroyer/gradle-errorprone-plugin GitHub 레포지토리 README의 verbatim 발췌. net.ltgt.errorprone 플러그인의 적용 방법, JDK 16+ forking 동작, options.errorprone DSL, 최소 요구 버전의 1차 출처.

Parent / 활용 branch (필수)

Branch 이 자료가 정당화하는 결정
raw/branch-notes/feature-static-analysis-quality-contract D5 — net.ltgt.errorprone 플러그인 채택, Java 21에서 javac forking + JVM args 자동 처리 근거

출처 / Source

왜 저장했는지 / Why archived

feature-static-analysis-quality-contract branch 의 D5 결정(ErrorProne 채택 + Java 21 환경에서의 플러그인 동작)을 정당화하기 위해 보관. 특히 JDK 16+ 에서 plugin 이 자동으로 forking compiler 를 사용하고 --add-exports/--add-opens JVM args 를 주입한다는 사실 — 수동 구성 없이도 Java 21 빌드가 가능함의 직접 증거.

핵심 인용 / Key quotes (verbatim, 3~5문장)

[§Requirements] "This plugin requires using at least Gradle 6.8 and JDK 11 (for compilation; it's OK to use JDK 8 to run Gradle as long as compilations use at least JDK 11 through [Gradle Java Toolchains][gradle-toolchains])."

[§Requirements — ErrorProne version table]

Error Prone version Minimum JDK version
Up to 2.31 11
From 2.32 up to 2.42 17
Starting from 2.43 21

[§Usage — plugin block] id("net.ltgt.errorprone") version "<plugin version>"

[§Usage — dependency block] errorprone("com.google.errorprone:error_prone_core:$errorproneVersion")

[§JDK 16+ support] "The plugin will automatically [use a forking compiler][CompileOptions.fork] and pass the necessary [JVM arguments][BaseForkOptions.getJvmArgs] whenever it detects such a JDK is being used for the compilation task and ErrorProne is enabled (unless the Gradle daemon's JVM already was given the appropriate options [through org.gradle.jvmargs][org.gradle.jvmargs])."

[§Usage — options.errorprone configuration] options.errorprone.disableWarningsInGeneratedCode = true

Claims Extracted / 추출된 주장

이 자료가 직접 말하는 것만 claim 으로 분리한다. 내 프로젝트에 적용한 결론은 여기 쓰지 않는다.

Claim ID Claim (이 자료가 직접 말하는 것) Evidence quote Strength Applies to Does not prove
C1 플러그인 최소 요구 사항은 Gradle 6.8 이상, JDK 11 이상 (컴파일 기준) [§Requirements] "This plugin requires using at least Gradle 6.8 and JDK 11 (for compilation; ...)" official-reference net.ltgt.errorprone 플러그인 모든 버전 ca-tmpl 특정 Gradle 버전과의 실제 호환성
C2 ErrorProne 2.43 이상은 JDK 21 이상을 요구한다 [§Requirements table] "Starting from 2.43 — 21" official-reference ErrorProne 2.43+ 사용 시 특정 ca-tmpl 빌드에서 2.43+ 버전 선택 여부
C3 net.ltgt.errorprone plugin id 로 적용하고 errorprone configuration 에 error_prone_core 의존을 추가한다 [§Usage] id("net.ltgt.errorprone") + errorprone("com.google.errorprone:error_prone_core:$errorproneVersion") official-reference Gradle Kotlin DSL (Groovy DSL도 동등하게 지원) 플러그인 버전 선택 기준
C4 JDK 16+ 환경에서 plugin 은 자동으로 forking compiler 를 사용하고 필요한 JVM arguments (--add-opens/--add-exports) 를 주입한다 — 수동 구성 불필요 [§JDK 16+ support] "The plugin will automatically [use a forking compiler]... and pass the necessary [JVM arguments]... whenever it detects such a JDK is being used" official-reference ErrorProne 사용 + JDK 16 이상으로 컴파일하는 Gradle 프로젝트 Gradle daemon JVM 에 이미 org.gradle.jvmargs 로 해당 옵션이 설정된 경우 (그 경우 auto-fork 생략)
C5 options.errorprone { disableWarningsInGeneratedCode = true } 로 생성 코드 경고를 억제할 수 있다 [§Usage] options.errorprone.disableWarningsInGeneratedCode = true official-reference @Generated / @javax.annotation.Generated 애노테이션이 붙은 클래스 생성 코드 판별 기준(annotation 유무)이 프로젝트마다 동일하다는 것

Usage Boundaries / 적용 경계

  • 이 자료가 직접 증명하는 것:
    • C3: net.ltgt.errorprone plugin id + errorprone configuration 패턴이 플러그인의 공식 적용 방법임
    • C4: JDK 16+ 에서 수동 JVM arg 추가 없이 plugin 이 자동 처리함 — Java 21 빌드에서 별도 forkOptions.jvmArgs 블록 불필요
    • C1/C2: ca-tmpl 이 Gradle 6.8+ + ErrorProne 2.43+ 를 사용한다면 JDK 21 이상이 필요
  • 이 자료가 증명하지 않는 것:
    • ca-tmpl 특정 버전(예: com.google.errorprone:error_prone_core:2.x)과의 실제 동작 호환성
    • Android Gradle Plugin 환경에서의 동작 (README 에 명시적 불지원)
    • C4 의 예외 조건: javaHome 또는 executable 을 명시한 fork task 에는 JVM args 미주입
  • 내 프로젝트에 적용하려면 추가 확인이 필요한 것:
    • ca-tmpl 의 실제 Gradle 버전 + ErrorProne 버전 조합 호환성 로컬 검증
    • disableWarningsInGeneratedCode 가 MapStruct/Lombok 생성 코드에 실제 적용되는지 확인

메모 / Notes

  • C4 의 "unless Gradle daemon JVM 에 이미 옵션 설정" 예외는 실무에서 org.gradle.jvmargs 로 직접 설정하는 경우가 드물어 대부분 자동 처리됨 — 그러나 CI 환경에서 gradle.properties 확인 권고.
  • 추가로 봐야 할 동일 출처 페이지: Configuration Properties 전체 표checks, checkOptions, excludedPaths 등 추가 DSL 옵션.
  • 같은 주제 다른 official-doc / company-tech-blog: raw/official-docs/archunit-user-guide (정적 분석 — 아키텍처 룰 강제)
  • 이 자료를 인용한 wiki 요약: [[wiki/concepts/errorprone-gradle-integration]] (생성 시)