Skip to content

Commit 972cb02

Browse files
author
Andy Coates
committed
Fix warnings in build.gradle
...and add a default task
1 parent a5371a3 commit 972cb02

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

build.gradle

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,16 @@ test {
8181
}
8282
}
8383

84-
task createClasspathManifest {
85-
File outputDir = file("$buildDir/$name")
84+
tasks.register('createClasspathManifest') {
85+
var outputFile = layout.buildDirectory.file("$name/plugin-classpath.txt")
8686

8787
inputs.files sourceSets.main.runtimeClasspath
88-
outputs.dir outputDir
88+
outputs.file outputFile
8989

9090
doLast {
91-
outputDir.mkdirs()
92-
file("$outputDir/plugin-classpath.txt").text = sourceSets.main.runtimeClasspath.join('\n')
91+
File file = outputFile.get().asFile
92+
file.parentFile.mkdirs()
93+
file.text = sourceSets.main.runtimeClasspath.join('\n')
9394
}
9495
}
9596

@@ -114,10 +115,12 @@ gradlePlugin {
114115

115116
publishing { // used for publishing to local maven repository
116117
publications {
117-
pluginMaven(MavenPublication) {
118+
create("pluginMaven", MavenPublication) {
118119
groupId = 'org.javamodularity'
119120
artifactId = 'moduleplugin'
120121
version = project.version
121122
}
122123
}
123124
}
125+
126+
defaultTasks("check")

0 commit comments

Comments
 (0)