Gradle deprecated annotation processor warnings for lombok

后端 未结 3 1877
悲&欢浪女
悲&欢浪女 2021-02-03 22:06

After upgrading to gradle 4.7, my previously warning-free build now emits this warning:

The following annotation processors were detected on the compile c

3条回答
  •  独厮守ぢ
    2021-02-03 22:26

    If your project contains tests then you'll need the following configuration to completely rid yourself of the gradle warning:

    dependencies {
      compileOnly "org.projectlombok:lombok:1.18.2"
      testCompileOnly "org.projectlombok:lombok:1.18.2"
      annotationProcessor "org.projectlombok:lombok:1.18.2"
      testAnnotationProcessor "org.projectlombok:lombok:1.18.2"
    }
    

    Adjust the lombok version to suit.

提交回复
热议问题