Skip to content

Commit c4b41e9

Browse files
committed
build.gradle: replace new File() with file()
1 parent 4a8a9a1 commit c4b41e9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ plugins {
1919
id 'org.gradlex.extra-java-module-info' version '1.9'
2020
}
2121

22-
def dotGitFile = new File("$projectDir/.git")
22+
def dotGitFile = file "$projectDir/.git"
2323
def gitDir
2424
if (dotGitFile.isFile()) {
2525
def gitDirConfigValue = dotGitFile.readLines().stream().mapMulti { line, downstream ->
@@ -181,7 +181,7 @@ extraJavaModuleInfo {
181181
tasks.register('generateModuleInfo') {
182182
description = "Generates the \'$moduleInfoFile\' source file"
183183
doLast {
184-
new File(moduleInfoFile).write """\
184+
file(moduleInfoFile).write """\
185185
@SuppressWarnings({"requires-automatic", "Java9RedundantRequiresStatement"})
186186
module de.bwravencl.controllerbuddy {
187187
exports de.bwravencl.controllerbuddy.gui;
@@ -335,7 +335,7 @@ tasks.register('generateConstants') {
335335
licensesHtmlStringBuilder.insert(licensesHtmlStringBuilder.lastIndexOf('</table>'), '<tr><td>SDL_GameControllerDB</td><td>gamecontrollerdb.txt</td><td>zlib License</td><td><a href=\'https://raw.githubusercontent.com/mdqinc/SDL_GameControllerDB/master/LICENSE\'>Show license agreement</a></td></tr>')
336336
licensesHtmlStringBuilder.insert(licensesHtmlStringBuilder.lastIndexOf('</body>'), '</center>')
337337

338-
def file = new File(constantsFile)
338+
def file = file constantsFile
339339
file.getParentFile().mkdirs()
340340
file.write("""\
341341
package de.bwravencl.controllerbuddy.constants;\n

0 commit comments

Comments
 (0)