Skip to content

Commit 9c96e84

Browse files
committed
Fix local execution of gradle tasks and line ending issues
1 parent 0ca27a4 commit 9c96e84

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

.gitattributes

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# By default, detect text files automatically, and use whatever line terminators make sense for the OS
2-
* text=auto
2+
* text=auto eol=lf
33

44
# Java files are text, and we want Java-friendly readable hunk headers for diff
5-
*.java text diff=java
5+
*.java text diff=java eol=lf
66

77
# Force LF/CRLF format for files that are known to require it.
88
*.sh text eol=lf

gradle/java-module.gradle

+7-9
Original file line numberDiff line numberDiff line change
@@ -519,16 +519,14 @@ tasks.register( "ciCheck" ) {
519519
group "verification"
520520
description "Checks for CI environments"
521521
dependsOn tasks.check
522+
}
522523

523-
// These are already enforced by the formatChecks task
524-
spotlessApply {
525-
enabled = false
526-
}
527-
spotlessJavaApply {
528-
enabled = false
529-
}
530-
enforceRules {
531-
enabled = false
524+
gradle.taskGraph.whenReady {
525+
if ( it.hasTask( tasks.ciCheck ) ) {
526+
// These are already enforced by the formatChecks task
527+
tasks.spotlessApply.enabled = false
528+
tasks.spotlessJavaApply.enabled = false
529+
tasks.enforceRules.enabled = false
532530
}
533531
}
534532

0 commit comments

Comments
 (0)