You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by sc...@apache.org on 2019/01/24 23:38:50 UTC

[beam] branch master updated: [Dependency Update] upgrade to gradle-apt-plugin 0.20

This is an automated email from the ASF dual-hosted git repository.

scott pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new 8d5a368  [Dependency Update] upgrade to gradle-apt-plugin 0.20
     new 5eaf33c  Merge pull request #7613: [Dependency Update] upgrade to gradle-apt-plugin 0.20
8d5a368 is described below

commit 8d5a368d2fecf1a4db46b8591bc3b6a680eed9b2
Author: Michael Luckey <25...@users.noreply.github.com>
AuthorDate: Thu Jan 24 15:43:49 2019 +0100

    [Dependency Update] upgrade to gradle-apt-plugin 0.20
---
 build.gradle                                       |  2 +-
 .../org/apache/beam/gradle/BeamModulePlugin.groovy | 42 +++++-----------------
 2 files changed, 9 insertions(+), 35 deletions(-)

diff --git a/build.gradle b/build.gradle
index bb9de48..22b0c77 100644
--- a/build.gradle
+++ b/build.gradle
@@ -49,7 +49,7 @@ buildscript {
   }
   dependencies {
     classpath 'net.researchgate:gradle-release:2.6.0'                                                   // Enable gradle-based release management
-    classpath "net.ltgt.gradle:gradle-apt-plugin:0.13"                                                  // Enable a Java annotation processor
+    classpath "net.ltgt.gradle:gradle-apt-plugin:0.20"                                                  // Enable a Java annotation processor
     classpath "com.google.protobuf:protobuf-gradle-plugin:0.8.5"                                        // Enable proto code generation
     classpath "io.spring.gradle:propdeps-plugin:0.0.9.RELEASE"                                          // Enable provided and optional configurations
     classpath "gradle.plugin.org.nosphere.apache:creadur-rat-gradle:0.3.1"                              // Enable Apache license enforcement
diff --git a/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy b/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
index 7340f8f..859a896 100644
--- a/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
+++ b/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
@@ -657,6 +657,8 @@ class BeamModulePlugin implements Plugin<Project> {
       // Configures annotation processing for commonly used annotation processors
       // across all Java projects.
       project.apply plugin: "net.ltgt.apt"
+      // let idea apt plugin handle the ide integration
+      project.apply plugin: "net.ltgt.apt-idea"
       project.dependencies {
         // Note that these plugins specifically use the compileOnly and testCompileOnly
         // configurations because they are never required to be shaded or become a
@@ -667,13 +669,13 @@ class BeamModulePlugin implements Plugin<Project> {
 
         compileOnly auto_value_annotations
         testCompileOnly auto_value_annotations
-        apt auto_value
-        testApt auto_value
+        annotationProcessor auto_value
+        testAnnotationProcessor auto_value
 
         compileOnly auto_service
         testCompileOnly auto_service
-        apt auto_service
-        testApt auto_service
+        annotationProcessor auto_service
+        testAnnotationProcessor auto_service
 
         // These dependencies are needed to avoid error-prone warnings on package-info.java files,
         // also to include the annotations to suppress warnings.
@@ -684,8 +686,8 @@ class BeamModulePlugin implements Plugin<Project> {
         def findbugs_annotations = "com.google.code.findbugs:annotations:3.0.1"
         compileOnly findbugs_annotations
         testCompileOnly findbugs_annotations
-        apt findbugs_annotations
-        testApt findbugs_annotations
+        annotationProcessor findbugs_annotations
+        testAnnotationProcessor findbugs_annotations
       }
 
       // Add the optional and provided configurations for dependencies
@@ -1089,34 +1091,6 @@ class BeamModulePlugin implements Plugin<Project> {
           }
         }
       }
-
-      // These directories for when build actions are delegated to Gradle
-      def gradleAptGeneratedMain = "${project.buildDir}/generated/source/apt/main"
-      def gradleAptGeneratedTest = "${project.buildDir}/generated/source/apt/test"
-
-      // These directories for when build actions are executed by Idea
-      // IntelliJ does not add these source roots (that it owns!) unless hinted
-      def ideaRoot = "${project.projectDir}/out"
-      def ideaAptGeneratedMain = "${ideaRoot}/production/classes/generated"
-      def ideaAptGeneratedTest = "${ideaRoot}/test/classes/generated_test"
-
-      project.idea {
-        module {
-          sourceDirs += project.file(gradleAptGeneratedMain)
-          testSourceDirs += project.file(gradleAptGeneratedTest)
-
-          sourceDirs += project.file(ideaAptGeneratedMain)
-          testSourceDirs += project.file(ideaAptGeneratedTest)
-
-          generatedSourceDirs += [
-            project.file(gradleAptGeneratedMain),
-            project.file(gradleAptGeneratedTest),
-            project.file(ideaAptGeneratedMain),
-            project.file(ideaAptGeneratedTest)
-          ]
-
-        }
-      }
     }
 
     // When applied in a module's build.gradle file, this closure provides task for running