mirror of
https://github.com/google/nomulus.git
synced 2025-08-05 17:28:25 +02:00
Clean up generated sources configuration (#724)
1. The Gradle apt plugin is no longer needed to process annotations. 2. Without the apt plugin, Gralde puts the source files generated by annotation processors in build/generated/sources/annotationProcessor. 3. Change the location of custom generated files to be consistent. 4. Fix a javadoc formatting error.
This commit is contained in:
parent
b4b7095ed3
commit
043c0aaeb8
26 changed files with 7 additions and 83 deletions
15
build.gradle
15
build.gradle
|
@ -35,9 +35,6 @@ plugins {
|
|||
// Java static analysis plugins. Keep versions consistent with
|
||||
// ./buildSrc/build.gradle
|
||||
id 'nebula.lint' version '16.0.2'
|
||||
// TODO(weiminyu): consider remove net.ltgt.apt. Gradle 5.2+
|
||||
// has similar functionalities.
|
||||
id 'net.ltgt.apt' version '0.19' apply false
|
||||
id 'net.ltgt.errorprone' version '0.6.1'
|
||||
id 'checkstyle'
|
||||
id 'com.github.johnrengelman.shadow' version '5.1.0'
|
||||
|
@ -290,12 +287,6 @@ subprojects {
|
|||
|
||||
project.tasks.test.dependsOn runPresubmits
|
||||
|
||||
// Path to code generated with annotation processors. Note that this path is
|
||||
// chosen by the 'net.ltgt.apt' plugin, and may change if IDE-specific plugins
|
||||
// are applied, e.g., 'idea' or 'eclipse'
|
||||
def aptGeneratedDir = "${project.buildDir}/generated/source/apt/main"
|
||||
def aptGeneratedTestDir = "${project.buildDir}/generated/source/apt/test"
|
||||
|
||||
def commonlyExcludedResources = ['**/*.java', '**/BUILD']
|
||||
|
||||
project.ext.javaDir = "${project.projectDir}/src/main/java"
|
||||
|
@ -304,18 +295,12 @@ subprojects {
|
|||
|
||||
sourceSets {
|
||||
main {
|
||||
java {
|
||||
srcDirs += aptGeneratedDir
|
||||
}
|
||||
resources {
|
||||
srcDirs += project.ext.javaDir
|
||||
exclude commonlyExcludedResources
|
||||
}
|
||||
}
|
||||
test {
|
||||
java {
|
||||
srcDirs += aptGeneratedTestDir
|
||||
}
|
||||
resources {
|
||||
srcDirs += project.ext.javaTestDir
|
||||
exclude commonlyExcludedResources
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue