Skip to content

Commit 0f81a05

Browse files
TacoTheDankStypox
authored andcommitted
Use 'tasks.register' for Gradle tasks
1 parent 4a7fda9 commit 0f81a05

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

app/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ checkstyle {
132132
toolVersion = checkstyleVersion
133133
}
134134

135-
task runCheckstyle(type: Checkstyle) {
135+
tasks.register('runCheckstyle', Checkstyle) {
136136
source 'src'
137137
include '**/*.java'
138138
exclude '**/gen/**'
@@ -153,7 +153,7 @@ task runCheckstyle(type: Checkstyle) {
153153
def outputDir = "${project.buildDir}/reports/ktlint/"
154154
def inputFiles = project.fileTree(dir: "src", include: "**/*.kt")
155155

156-
task runKtlint(type: JavaExec) {
156+
tasks.register('runKtlint', JavaExec) {
157157
inputs.files(inputFiles)
158158
outputs.dir(outputDir)
159159
getMainClass().set("com.pinterest.ktlint.Main")
@@ -162,7 +162,7 @@ task runKtlint(type: JavaExec) {
162162
jvmArgs("--add-opens", "java.base/java.lang=ALL-UNNAMED")
163163
}
164164

165-
task formatKtlint(type: JavaExec) {
165+
tasks.register('formatKtlint', JavaExec) {
166166
inputs.files(inputFiles)
167167
outputs.dir(outputDir)
168168
getMainClass().set("com.pinterest.ktlint.Main")

0 commit comments

Comments
 (0)