@@ -53,7 +53,7 @@ public void registerSourceAlreadyRan(SpotlessTask task) {
53
53
}
54
54
55
55
public void registerApplyAlreadyRan (SpotlessApply task ) {
56
- apply .put (task .getSourceTaskPath (), task );
56
+ apply .put (task .sourceTaskPath (), task );
57
57
}
58
58
59
59
static String INDEPENDENT_HELPER = "Helper" ;
@@ -65,7 +65,7 @@ public static abstract class ClientTask extends DefaultTask {
65
65
@ Internal
66
66
abstract Property <SpotlessTaskService > getTaskService ();
67
67
68
- String getSourceTaskPath () {
68
+ String sourceTaskPath () {
69
69
String path = getPath ();
70
70
if (this instanceof SpotlessApply ) {
71
71
if (path .endsWith (SpotlessExtension .APPLY )) {
@@ -85,21 +85,21 @@ private SpotlessTaskService service() {
85
85
return getTaskService ().get ();
86
86
}
87
87
88
- public boolean getSourceDidWork () {
89
- SpotlessTask sourceTask = service ().source .get (getSourceTaskPath ());
88
+ protected boolean sourceDidWork () {
89
+ SpotlessTask sourceTask = service ().source .get (sourceTaskPath ());
90
90
if (sourceTask != null ) {
91
91
return sourceTask .getDidWork ();
92
92
} else {
93
93
return false ;
94
94
}
95
95
}
96
96
97
- public boolean applyHasRun () {
98
- return service ().apply .containsKey (getSourceTaskPath ());
97
+ protected boolean applyHasRun () {
98
+ return service ().apply .containsKey (sourceTaskPath ());
99
99
}
100
100
101
- String errorMsgForCheck (List <File > problemFiles , String runToFix ) throws IOException {
102
- SpotlessTask task = service ().source .get (getSourceTaskPath ());
101
+ protected String errorMsgForCheck (List <File > problemFiles , String runToFix ) throws IOException {
102
+ SpotlessTask task = service ().source .get (sourceTaskPath ());
103
103
((SpotlessCheck ) this ).getSpotlessOutDirectory ();
104
104
if (task != null ) {
105
105
try (Formatter formatter = task .buildFormatter ()) {
@@ -125,7 +125,7 @@ private String cacheGet(FileSignature key) {
125
125
if (cached != null && cached .getKey ().equals (key )) {
126
126
return cached .getValue ();
127
127
} else {
128
- throw new IllegalStateException (getPath () + " is running but " + getSourceTaskPath () + " was up-to-date and didn't run" );
128
+ throw new IllegalStateException (getPath () + " is running but " + sourceTaskPath () + " was up-to-date and didn't run" );
129
129
}
130
130
}
131
131
}
0 commit comments