Skip to content

Commit

Permalink
build.gradle: replace new File() with file()
Browse files Browse the repository at this point in the history
  • Loading branch information
bwRavencl committed Jan 12, 2025
1 parent 4a8a9a1 commit c4b41e9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ plugins {
id 'org.gradlex.extra-java-module-info' version '1.9'
}

def dotGitFile = new File("$projectDir/.git")
def dotGitFile = file "$projectDir/.git"
def gitDir
if (dotGitFile.isFile()) {
def gitDirConfigValue = dotGitFile.readLines().stream().mapMulti { line, downstream ->
Expand Down Expand Up @@ -181,7 +181,7 @@ extraJavaModuleInfo {
tasks.register('generateModuleInfo') {
description = "Generates the \'$moduleInfoFile\' source file"
doLast {
new File(moduleInfoFile).write """\
file(moduleInfoFile).write """\
@SuppressWarnings({"requires-automatic", "Java9RedundantRequiresStatement"})
module de.bwravencl.controllerbuddy {
exports de.bwravencl.controllerbuddy.gui;
Expand Down Expand Up @@ -335,7 +335,7 @@ tasks.register('generateConstants') {
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>')
licensesHtmlStringBuilder.insert(licensesHtmlStringBuilder.lastIndexOf('</body>'), '</center>')

def file = new File(constantsFile)
def file = file constantsFile
file.getParentFile().mkdirs()
file.write("""\
package de.bwravencl.controllerbuddy.constants;\n
Expand Down

0 comments on commit c4b41e9

Please sign in to comment.