Skip to content
/ beam Public
forked from apache/beam

Commit

Permalink
[Dependency Update] upgrade to gradle-apt-plugin 0.20
Browse files Browse the repository at this point in the history
  • Loading branch information
adude3141 authored and swegner committed Jan 24, 2019
1 parent 98952d2 commit 8d5a368
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 35 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8d5a368

Please sign in to comment.