diff --git a/gradle/grails-plugin-config.gradle b/gradle/grails-plugin-config.gradle new file mode 100644 index 0000000000..da07410b72 --- /dev/null +++ b/gradle/grails-plugin-config.gradle @@ -0,0 +1,7 @@ +tasks.named('bootJar') { + enabled = false // Plugins should not create a bootJar +} +tasks.named('jar', Jar) { + enabled = true // Enable the jar task again, as the bootJar task has been disabled + archiveClassifier = '' // Remove '-plain' suffix from jar file name +} \ No newline at end of file diff --git a/grails-plugin-gsp/build.gradle b/grails-plugin-gsp/build.gradle index 89e134da45..4a2c973b83 100644 --- a/grails-plugin-gsp/build.gradle +++ b/grails-plugin-gsp/build.gradle @@ -41,11 +41,7 @@ dependencies { testRuntimeOnly "org.grails:grails-plugin-url-mappings:$grailsVersion" } -// disable main class -bootJar { - mainClass.set('dummy.Application') -} -findMainClass.onlyIf { false } + test { if (isCiBuild) { maxParallelForks = 1 @@ -62,3 +58,5 @@ test { System.out.flush() } } + +apply from: rootProject.layout.projectDirectory.file('gradle/grails-plugin-config.gradle') diff --git a/grails-plugin-sitemesh2/build.gradle b/grails-plugin-sitemesh2/build.gradle index c1862710cf..e984a1ecf9 100644 --- a/grails-plugin-sitemesh2/build.gradle +++ b/grails-plugin-sitemesh2/build.gradle @@ -23,8 +23,5 @@ dependencies { exclude group:'org.grails', module:'grails-web-common' } } -// disable main class -bootJar { - mainClass.set('dummy.Application') -} -findMainClass.onlyIf { false } \ No newline at end of file + +apply from: rootProject.layout.projectDirectory.file('gradle/grails-plugin-config.gradle') \ No newline at end of file