@@ -5,7 +5,7 @@ task japicc {
5
5
workingDir = new File (project. buildDir, ' japicc' )
6
6
}
7
7
}
8
- project . tasks. check. dependsOn(japicc)
8
+ tasks. check. dependsOn(japicc)
9
9
10
10
if (rootProject. tasks. findByName(' japiccDownload' ) == null ) {
11
11
rootProject. tasks. create(' japiccDownload' ) {
@@ -44,7 +44,7 @@ task japiccNonImpl {
44
44
description ' List non impl interfaces'
45
45
46
46
ext {
47
- nonImplFile = new File (project . tasks. japicc. workingDir, ' non-impl' )
47
+ nonImplFile = new File (tasks. japicc. workingDir, ' non-impl' )
48
48
}
49
49
50
50
inputs. files sourceSets. main. java
@@ -128,11 +128,11 @@ def addCheck(Jar jarTask) {
128
128
String archiveAppendix = jarTask. archiveAppendix. getOrElse(' ' )
129
129
String taskName = ' japiccCheck' + archiveAppendix. capitalize()
130
130
131
- def task = project . tasks. create(taskName) {
131
+ def task = tasks. create(taskName) {
132
132
133
133
group ' japicc'
134
134
description ' Checks for binary and source incompatibility.'
135
- dependsOn rootProject. tasks. japiccDownload, project . tasks. japiccNonImpl
135
+ dependsOn rootProject. tasks. japiccDownload, tasks. japiccNonImpl
136
136
137
137
String archiveName = archiveBaseName
138
138
if (archiveAppendix != ' ' ) {
@@ -141,9 +141,9 @@ def addCheck(Jar jarTask) {
141
141
142
142
String lastSemVer = project. prevVersion
143
143
String lastJarName = archiveName + ' -' + lastSemVer + ' .jar'
144
- File lastJar = new File (project . tasks. japicc. workingDir, lastJarName)
144
+ File lastJar = new File (tasks. japicc. workingDir, lastJarName)
145
145
146
- File report = new File (new File (new File (new File (project . tasks. japicc. workingDir, ' compat_reports' ),
146
+ File report = new File (new File (new File (new File (tasks. japicc. workingDir, ' compat_reports' ),
147
147
archiveName), lastSemVer + ' _to_' + project. version), ' compat_report.html' )
148
148
149
149
inputs. files jarTask
@@ -165,7 +165,7 @@ def addCheck(Jar jarTask) {
165
165
lastJar. parentFile. mkdirs()
166
166
if (! lastJar. exists()) {
167
167
String path = project. group. replace(' .' , ' /' ) + ' /' + archiveName + ' /' + lastSemVer + ' /' + lastJarName
168
- new URL (project . repositories. mavenCentral(). url. toString() + path)
168
+ new URL (repositories. mavenCentral(). url. toString() + path)
169
169
.withInputStream { i -> lastJar. withOutputStream { it << i } }
170
170
}
171
171
}
@@ -177,23 +177,23 @@ def addCheck(Jar jarTask) {
177
177
def command = [' perl' , rootProject. tasks. japiccDownload. executable. getPath(), ' -lib' , archiveName,
178
178
' -skip-internal-packages' , ' com.hivemq.client.internal' ,
179
179
' -skip-internal-packages' , ' com.hivemq.shaded' ,
180
- ' -non-impl' , project . tasks. japiccNonImpl. nonImplFile. getPath(),
180
+ ' -non-impl' , tasks. japiccNonImpl. nonImplFile. getPath(),
181
181
' -check-annotations' , ' -s' ,
182
182
lastJar. getPath(), jarTask. archiveFile. get(). getAsFile(). getPath()]
183
183
184
- Process process = new ProcessBuilder (command). directory(project . tasks. japicc. workingDir). start()
184
+ Process process = new ProcessBuilder (command). directory(tasks. japicc. workingDir). start()
185
185
int returnCode = process. waitFor()
186
186
if (returnCode != 0 ) {
187
187
throw new GradleException (' Binary or source incompatibilities, code ' + returnCode)
188
188
}
189
189
}
190
190
}
191
- project . tasks. japicc. dependsOn(task)
191
+ tasks. japicc. dependsOn(task)
192
192
}
193
193
194
194
afterEvaluate {
195
- addCheck(project . tasks. jar)
196
- if (project . plugins. hasPlugin(' com.github.johnrengelman.shadow' )) {
197
- addCheck(project . tasks. shadowJar)
195
+ addCheck(tasks. jar)
196
+ if (plugins. hasPlugin(' com.github.johnrengelman.shadow' )) {
197
+ addCheck(tasks. shadowJar)
198
198
}
199
199
}
0 commit comments