Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move spotless check to separate build task #1946

Merged
merged 12 commits into from Jun 17, 2020
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does script: ./gradlew spotlessCheck mean that on openjdk11 we only run "spotlessCheck" task?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It means that we have 1 task that only runs spotless, and that task runs on opendjk11. We still have the other openjdk11 builds to verify that the tests pass etc... I will add a comment for clarification.

# 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does after_success: true do here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To make sure we don't run the coverage report task, since that's not what spotless generates. I will add a clarifying comment.


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