Skip to content

Commit 3bf997a

Browse files
committed
Don't use file property
1 parent 8166cc9 commit 3bf997a

1 file changed

Lines changed: 3 additions & 10 deletions

File tree

src/main/groovy/org/labkey/gradle/task/StopLabKey.groovy

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616
package org.labkey.gradle.task
1717

1818
import org.gradle.api.DefaultTask
19-
import org.gradle.api.file.RegularFileProperty
20-
import org.gradle.api.tasks.InputFile
21-
import org.gradle.api.tasks.Optional
2219
import org.gradle.api.tasks.TaskAction
2320
import org.labkey.gradle.plugin.extension.ServerDeployExtension
2421

@@ -30,15 +27,12 @@ import java.nio.file.Files
3027
*/
3128
class StopLabKey extends DefaultTask
3229
{
33-
@InputFile @Optional
34-
final abstract RegularFileProperty pidFile = project.objects.fileProperty().convention(
35-
ServerDeployExtension.getEmbeddedDir(project).file("labkey.pid")
36-
)
37-
3830
@TaskAction
3931
void action()
4032
{
41-
if (pidFile.get().asFile.exists())
33+
File pidFile = ServerDeployExtension.getEmbeddedDir(project).file("labkey.pid").asFile
34+
35+
if (pidFile.exists())
4236
{
4337
String pidStr = new String(Files.readAllBytes(pidFile.get().asFile.toPath()), StandardCharsets.UTF_8).trim()
4438
Integer pid = Integer.parseInt(pidStr)
@@ -69,5 +63,4 @@ class StopLabKey extends DefaultTask
6963
}
7064
}
7165
}
72-
7366
}

0 commit comments

Comments
 (0)