Skip to content

Commit

Permalink
Move spotless check to separate build task (#1946)
Browse files Browse the repository at this point in the history
This means the tests can run in parallel of the formatting changes.
Therefore, formatting changes would not block obtaining your test
results, which should hopefully reduce the amount of Travis builds
necessary to work on a community PR.

This is also in preparation of #1934 which requires spotless to
run on JDK11 minimum.
  • Loading branch information
TimvdLippe committed Jun 17, 2020
1 parent 9e16fee commit e5a9da5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
10 changes: 9 additions & 1 deletion .travis.yml
Expand Up @@ -34,8 +34,16 @@ matrix:
env: SKIP_RELEASE=true
- jdk: openjdk11
env: SKIP_RELEASE=true MOCK_MAKER=mock-maker-inline
# Run Spotless as a separate job on JDK 11 (which is required for google-java-format)
- jdk: openjdk11
name: "Verify code formatting with Spotless"
script: ./gradlew spotlessCheck
# Do not upload a coverage report, as we don't run the tests for this job
after_success: true
- jdk: openjdk8
name: "Check reproducibility of jars"
script: ./check_reproducibility.sh
# Do not upload a coverage report, as we don't run the tests for this job
after_success: true

branches:
Expand All @@ -53,7 +61,7 @@ script:
# We are using && below on purpose
# ciPerformRelease must run only when the entire build has completed
# This guarantees that no release steps are executed when the build or tests fail
- ./gradlew spotlessCheck && ./gradlew build idea -s && ./gradlew ciPerformRelease
- ./gradlew build idea -s && ./gradlew ciPerformRelease

after_success:
#Generates coverage report:
Expand Down
8 changes: 4 additions & 4 deletions settings.gradle.kts
@@ -1,3 +1,7 @@
plugins {
id("com.gradle.enterprise").version("3.3.4")
}

include("deprecatedPluginsTest",
"inline",
"extTest",
Expand Down Expand Up @@ -34,10 +38,6 @@ rootProject.children.forEach { project ->
}
}

plugins {
id("com.gradle.enterprise").version("3.3.4")
}

//Posting Build scans to https://scans.gradle.com
gradleEnterprise {
buildScan {
Expand Down

0 comments on commit e5a9da5

Please sign in to comment.