mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-03-27 19:57:00 -05:00
Always use unix line endings on windows (#986)
* Always use unix line endings on windows * Also run checks on windows. * Fix binary files :)
This commit is contained in:
40
.gitattributes
vendored
40
.gitattributes
vendored
@@ -1,38 +1,2 @@
|
|||||||
# Handle line endings automatically for files detected as text
|
* text=auto eol=lf
|
||||||
# and leave all files detected as binary untouched.
|
*.bat text eol=crlf
|
||||||
* text=auto
|
|
||||||
|
|
||||||
*.patch text eol=lf
|
|
||||||
|
|
||||||
#
|
|
||||||
# The above will handle all files NOT found below
|
|
||||||
#
|
|
||||||
# These files are text and should be normalized (Convert crlf => lf)
|
|
||||||
*.css text
|
|
||||||
*.df text
|
|
||||||
*.htm text
|
|
||||||
*.html text
|
|
||||||
*.java text
|
|
||||||
*.js text
|
|
||||||
*.json text
|
|
||||||
*.jsp text
|
|
||||||
*.jspf text
|
|
||||||
*.properties text
|
|
||||||
*.sh text
|
|
||||||
*.tld text
|
|
||||||
*.txt text
|
|
||||||
*.xml text
|
|
||||||
|
|
||||||
# These files are binary and should be left untouched
|
|
||||||
# (binary is a macro for -text -diff)
|
|
||||||
*.class binary
|
|
||||||
*.dll binary
|
|
||||||
*.ear binary
|
|
||||||
*.gif binary
|
|
||||||
*.ico binary
|
|
||||||
*.jar binary
|
|
||||||
*.jpg binary
|
|
||||||
*.jpeg binary
|
|
||||||
*.png binary
|
|
||||||
*.so binary
|
|
||||||
*.war binary
|
|
||||||
12
.github/workflows/test-push.yml
vendored
12
.github/workflows/test-push.yml
vendored
@@ -20,6 +20,18 @@ jobs:
|
|||||||
- uses: gradle/wrapper-validation-action@v1
|
- uses: gradle/wrapper-validation-action@v1
|
||||||
- run: gradle build check -x test --stacktrace --warning-mode fail
|
- run: gradle build check -x test --stacktrace --warning-mode fail
|
||||||
|
|
||||||
|
build_windows:
|
||||||
|
runs-on: windows-2022
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: setup jdk
|
||||||
|
uses: actions/setup-java@v3
|
||||||
|
with:
|
||||||
|
java-version: 17
|
||||||
|
distribution: 'temurin'
|
||||||
|
- uses: gradle/wrapper-validation-action@v1
|
||||||
|
- run: ./gradlew build check -x test --stacktrace --warning-mode fail
|
||||||
|
|
||||||
# This job is used to feed the test matrix of next job to allow the tests to run in parallel
|
# This job is used to feed the test matrix of next job to allow the tests to run in parallel
|
||||||
prepare_test_matrix:
|
prepare_test_matrix:
|
||||||
# Lets wait to ensure it builds before going running tests
|
# Lets wait to ensure it builds before going running tests
|
||||||
|
|||||||
@@ -215,6 +215,8 @@ java {
|
|||||||
}
|
}
|
||||||
|
|
||||||
spotless {
|
spotless {
|
||||||
|
lineEndings = com.diffplug.spotless.LineEnding.UNIX
|
||||||
|
|
||||||
java {
|
java {
|
||||||
licenseHeaderFile(rootProject.file("HEADER")).yearSeparator("-")
|
licenseHeaderFile(rootProject.file("HEADER")).yearSeparator("-")
|
||||||
targetExclude("**/loom/util/DownloadUtil.java")
|
targetExclude("**/loom/util/DownloadUtil.java")
|
||||||
|
|||||||
@@ -51,18 +51,12 @@ class ReproducibleBuildTest extends Specification implements GradleProjectTestTr
|
|||||||
then:
|
then:
|
||||||
result.task(":build").outcome == SUCCESS
|
result.task(":build").outcome == SUCCESS
|
||||||
generateMD5(gradle.getOutputFile("fabric-example-mod-1.0.0.jar")) == modHash
|
generateMD5(gradle.getOutputFile("fabric-example-mod-1.0.0.jar")) == modHash
|
||||||
generateMD5(gradle.getOutputFile("fabric-example-mod-1.0.0-sources.jar")) in sourceHash // Done for different line endings.
|
generateMD5(gradle.getOutputFile("fabric-example-mod-1.0.0-sources.jar")) == sourceHash
|
||||||
|
|
||||||
where:
|
where:
|
||||||
version | modHash | sourceHash
|
version | modHash | sourceHash
|
||||||
DEFAULT_GRADLE | "207bd75aa34fc996a97e962dd98b61d5" | [
|
DEFAULT_GRADLE | "207bd75aa34fc996a97e962dd98b61d5" | "8e8fac2a5e32fc872e6cf0f9ccc55cfd"
|
||||||
"8e8fac2a5e32fc872e6cf0f9ccc55cfd",
|
PRE_RELEASE_GRADLE | "207bd75aa34fc996a97e962dd98b61d5" | "8e8fac2a5e32fc872e6cf0f9ccc55cfd"
|
||||||
"ed331b6fae5677797a0104eba014e255"
|
|
||||||
]
|
|
||||||
PRE_RELEASE_GRADLE | "207bd75aa34fc996a97e962dd98b61d5" | [
|
|
||||||
"8e8fac2a5e32fc872e6cf0f9ccc55cfd",
|
|
||||||
"ed331b6fae5677797a0104eba014e255"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
String generateMD5(File file) {
|
String generateMD5(File file) {
|
||||||
|
|||||||
Reference in New Issue
Block a user