Skip to content

Commit

Permalink
Merge reactor#2729 into 3.4.8
Browse files Browse the repository at this point in the history
Changed the default branch to `main` for ratchet.
  • Loading branch information
simonbasle committed Jun 30, 2021
2 parents 98563e8 + 4f18a4d commit e36af57
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-java@v1
with:
java-version: 8
- uses: eskatos/gradle-command-action@v1
name: gradle
name: license header
with:
arguments: check -x :reactor-core:test --no-daemon
arguments: spotlessCheck -PspotlessFrom=origin/${{ github.base_ref }}
wrapper-cache-enabled: true
dependencies-cache-enabled: true
configuration-cache-enabled: true
#the above should exclude jcstress in master, adding a 3rd job below for jcstress
- uses: eskatos/gradle-command-action@v1
name: other tests
with:
arguments: check -x :reactor-core:test --no-daemon
wrapper-cache-enabled: true
dependencies-cache-enabled: true
configuration-cache-enabled: true
22 changes: 22 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ plugins {
id 'biz.aQute.bnd.builder' version '5.0.1' apply false
id 'io.spring.nohttp' version '0.0.5.RELEASE'
id "io.github.reyerizo.gradle.jcstress" version "0.8.11" apply false
id "com.diffplug.spotless" version "5.14.0"
}

apply plugin: "io.reactor.gradle.detect-ci"
Expand Down Expand Up @@ -131,6 +132,27 @@ nohttp {
allowlistFile = project.file('codequality/nohttp/allowlist.lines')
}

spotless {
if (project.hasProperty("spotlessFrom")) {
println "[Spotless] Ratchet from $project.spotlessFrom"
ratchetFrom project.spotlessFrom
}
else if (isCiServer) {
println "[Spotless] CI detected without explicit branch, not enforcing check"
enforceCheck false
}
else {
String spotlessBranch = "origin/main"
println "[Spotless] Local run detected, ratchet from $spotlessBranch"
ratchetFrom spotlessBranch
}
java {
target '**/*.java'
targetExclude '**/java8stubs/**/*', '**/java9stubs/**/*'
licenseHeaderFile('codequality/spotless/licenseSlashstarStyle.txt')
}
}

configure(subprojects) { p ->
apply plugin: 'java'
apply plugin: 'jacoco'
Expand Down
16 changes: 16 additions & 0 deletions codequality/spotless/licenseSlashstarStyle.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Copyright (c) 2011-$today.year VMware Inc. or its affiliates, All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

0 comments on commit e36af57

Please sign in to comment.