Skip to content

Commit

Permalink
build: add clirr check (googleapis#380)
Browse files Browse the repository at this point in the history
* build: add clirr check

* build: fix checkstyle source directories
  • Loading branch information
chingor13 authored Nov 18, 2019
1 parent ff8606a commit e9c51d7
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .kokoro/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ cd github/google-auth-library-java/
java -version
echo $JOB_TYPE

mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
mvn install -B -V \
-DskipTests=true \
-Dclirr.skip \
-Dmaven.javadoc.skip=true

case ${JOB_TYPE} in
test)
Expand All @@ -37,6 +40,9 @@ javadoc)
integration)
mvn -B -pl ${INTEGRATION_TEST_ARGS} -DtrimStackTrace=false -fae verify
;;
clirr)
mvn -B clirr:check
;;
*)
;;
esac
4 changes: 3 additions & 1 deletion .kokoro/dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,7 @@ echo $JOB_TYPE

export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m"

mvn install -DskipTests=true -B -V
mvn install -B -V \
-Dclirr.skip=true \
-DskipTests=true
mvn -B dependency:analyze -DfailOnWarning=true
13 changes: 13 additions & 0 deletions .kokoro/presubmit/clirr.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Configure the docker image for kokoro-trampoline.

env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
}

env_vars: {
key: "JOB_TYPE"
value: "clirr"
}
27 changes: 27 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,11 @@
<verbose>true</verbose>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>clirr-maven-plugin</artifactId>
<version>2.8</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
Expand Down Expand Up @@ -255,6 +260,13 @@
<violationSeverity>error</violationSeverity>
<failsOnError>true</failsOnError>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<!-- Explicitly set the source directory to avoid running checkstyle on generated sources. -->
<sourceDirectories>
<sourceDirectory>src/main</sourceDirectory>
</sourceDirectories>
<testSourceDirectories>
<testSourceDirectory>src/test</testSourceDirectory>
</testSourceDirectories>
</configuration>
</execution>
</executions>
Expand Down Expand Up @@ -286,6 +298,21 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>clirr-maven-plugin</artifactId>
<configuration>
<ignoredDifferencesFile>clirr-ignored-differences.xml</ignoredDifferencesFile>
<logResults>true</logResults>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down

0 comments on commit e9c51d7

Please sign in to comment.