diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000000..bb63bb6d804 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,14 @@ +# Normalize line endings to auto. +* text eol=lf + +# Ensure the following are treated as binary. +*.bat binary +*.graffle binary +*.jar binary +*.jpeg binary +*.jpg binary +*.keystore binary +*.odg binary +*.otg binary +*.png binary +*.cer binary diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index 65201e4596e..176cb1d7dd1 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -64,6 +64,26 @@ jobs: with: name: errors path: job-${{ github.job }}.txt + check_windows: + name: Check Windows + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: '11' + - name: Cache Gradle packages + uses: actions/cache@v2 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} + - name: Check with Gradle + run: | + set GRADLE_ENTERPRISE_CACHE_USERNAME="$GRADLE_ENTERPRISE_CACHE_USER" + set GRADLE_ENTERPRISE_CACHE_PASSWORD="$GRADLE_ENTERPRISE_CACHE_PASSWORD" + set GRADLE_ENTERPRISE_ACCESS_KEY="$GRADLE_ENTERPRISE_SECRET_ACCESS_KEY" + ./gradlew check -PartifactoryUsername="$ARTIFACTORY_USERNAME" -PartifactoryPassword="$ARTIFACTORY_PASSWORD" snapshot_tests: name: Test against snapshots runs-on: ubuntu-latest diff --git a/.github/workflows/pr-build-workflow.yml b/.github/workflows/pr-build-workflow.yml index 7d98efeaa08..16d1523124d 100644 --- a/.github/workflows/pr-build-workflow.yml +++ b/.github/workflows/pr-build-workflow.yml @@ -20,3 +20,19 @@ jobs: key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} - name: Build with Gradle run: ./gradlew clean build --continue --scan + check_windows: + name: Check Windows + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - name: Set up JDK + uses: actions/setup-java@v1 + with: + java-version: '11' + - name: Cache Gradle packages + uses: actions/cache@v2 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} + - name: Check with Gradle + run: ./gradlew :saml2-service-provider-core:checkFormatMain --stacktrace diff --git a/buildSrc/src/test/resources/samples/showcase/settings.gradle b/buildSrc/src/test/resources/samples/showcase/settings.gradle index 1997a84cc30..5b63a3c3ab2 100644 --- a/buildSrc/src/test/resources/samples/showcase/settings.gradle +++ b/buildSrc/src/test/resources/samples/showcase/settings.gradle @@ -1,3 +1,5 @@ +import java.util.regex.Matcher + rootProject.name = 'spring-gradle-build-conventions-sample' @@ -10,7 +12,7 @@ String rootDirPath = rootDir.absolutePath + File.separator projects.each { File buildFile -> String buildFilePath = buildFile.parentFile.absolutePath - String projectPath = buildFilePath.replace(rootDirPath, '').replaceAll(File.separator, ':') + String projectPath = buildFilePath.replace(rootDirPath, '').replaceAll(Matcher.quoteReplacement(File.separator), ':') include projectPath @@ -20,4 +22,4 @@ projects.each { File buildFile -> project.buildFileName = buildFile.name } project.projectDir = buildFile.parentFile -} \ No newline at end of file +}