From 3bbb4e623942111f7f2989b7138c523dc123d62e Mon Sep 17 00:00:00 2001 From: Roberto Perez Alcolea Date: Wed, 27 Nov 2019 12:25:07 -0800 Subject: [PATCH] fix tests and support for grunt/gulp/node in gradle 6 --- CHANGELOG.md | 4 ++-- README.md | 6 +++--- .../gradle/grunt/GruntInstall_integTest.groovy | 2 +- .../gradle/grunt/GruntRule_integTest.groovy | 2 +- .../moowork/gradle/grunt/Grunt_integTest.groovy | 2 +- .../gradle/gulp/GulpInstall_integTest.groovy | 2 +- .../moowork/gradle/gulp/GulpRule_integTest.groovy | 2 +- .../com/moowork/gradle/gulp/Gulp_integTest.groovy | 2 +- .../gradle/node/npm/NpmInstall_integTest.groovy | 6 +++--- .../gradle/node/npm/NpmRule_integTest.groovy | 14 +++++++------- .../moowork/gradle/node/task/Node_integTest.groovy | 4 ++-- .../gradle/node/task/Setup_integTest.groovy | 10 +++++----- .../gradle/node/yarn/YarnInstall_integTest.groovy | 6 +++--- .../gradle/node/yarn/YarnRule_integTest.groovy | 4 ++-- .../com/moowork/gradle/node/task/SetupTask.groovy | 3 +++ .../gradle-plugins/nebula.grunt.properties | 1 + .../META-INF/gradle-plugins/nebula.gulp.properties | 1 + .../META-INF/gradle-plugins/nebula.node.properties | 1 + .../moowork/gradle/grunt/AbstractTaskTest.groovy | 2 +- .../moowork/gradle/grunt/GruntPluginTest.groovy | 2 +- .../moowork/gradle/gulp/AbstractTaskTest.groovy | 2 +- .../com/moowork/gradle/gulp/GulpPluginTest.groovy | 2 +- .../moowork/gradle/node/NodeExtensionTest.groovy | 2 +- .../com/moowork/gradle/node/NodePluginTest.groovy | 6 +++--- .../gradle/node/task/AbstractTaskTest.groovy | 2 +- 25 files changed, 48 insertions(+), 42 deletions(-) create mode 100644 src/main/resources/META-INF/gradle-plugins/nebula.grunt.properties create mode 100644 src/main/resources/META-INF/gradle-plugins/nebula.gulp.properties create mode 100644 src/main/resources/META-INF/gradle-plugins/nebula.node.properties diff --git a/CHANGELOG.md b/CHANGELOG.md index b83dca0..d80b2a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -124,7 +124,7 @@ Version 0.8 *(2014-11-19)* * Publish snapshots to jcenter _(dougborg)_ * Add node to execution path for NodeExec _(dougborg)_ -* Use 'com.moowork.node' id instead of 'node +* Use 'nebula.node' id instead of 'node * Upgraded wrapper to use Gradle 2.2 Version 0.7 *(2014-11-03)* @@ -138,7 +138,7 @@ Version 0.6 *(2014-07-10)* -------------------------- * Upgrade to Gradle 2.0 -* Using 'com.moowork.node' as plugin id, but 'node' still works for another version +* Using 'nebula.node' as plugin id, but 'node' still works for another version * Possible to read execResult for npm and node tasks _(johnrengelman)_ Version 0.5 *(2014-03-29)* diff --git a/README.md b/README.md index 6dd5aec..e883a75 100644 --- a/README.md +++ b/README.md @@ -12,9 +12,9 @@ with Gradle: It's actually 3 plugins in one: -* [Node Plugin](https://plugins.gradle.org/plugin/com.moowork.node) (`com.moowork.node`) - [See docs](docs/node.md). -* [Grunt Plugin](https://plugins.gradle.org/plugin/com.moowork.grunt) (`com.moowork.grunt`) - [See docs](docs/grunt.md) -* [Gulp Plugin](https://plugins.gradle.org/plugin/com.moowork.gulp) (`com.moowork.gulp`) - [See docs](docs/gulp.md) +* [Node Plugin](https://plugins.gradle.org/plugin/nebula.node) (`nebula.node`) - [See docs](docs/node.md). +* [Grunt Plugin](https://plugins.gradle.org/plugin/nebula.grunt) (`nebula.grunt`) - [See docs](docs/grunt.md) +* [Gulp Plugin](https://plugins.gradle.org/plugin/nebula.gulp) (`nebula.gulp`) - [See docs](docs/gulp.md) diff --git a/src/integTest/groovy/com/moowork/gradle/grunt/GruntInstall_integTest.groovy b/src/integTest/groovy/com/moowork/gradle/grunt/GruntInstall_integTest.groovy index 8df61c5..2100f4d 100644 --- a/src/integTest/groovy/com/moowork/gradle/grunt/GruntInstall_integTest.groovy +++ b/src/integTest/groovy/com/moowork/gradle/grunt/GruntInstall_integTest.groovy @@ -11,7 +11,7 @@ class GruntInstall_integTest given: writeBuild( ''' plugins { - id 'com.moowork.grunt' + id 'nebula.grunt' } node { diff --git a/src/integTest/groovy/com/moowork/gradle/grunt/GruntRule_integTest.groovy b/src/integTest/groovy/com/moowork/gradle/grunt/GruntRule_integTest.groovy index a5ffcd3..8988ed5 100644 --- a/src/integTest/groovy/com/moowork/gradle/grunt/GruntRule_integTest.groovy +++ b/src/integTest/groovy/com/moowork/gradle/grunt/GruntRule_integTest.groovy @@ -11,7 +11,7 @@ class GruntRule_integTest given: writeBuild( ''' plugins { - id 'com.moowork.grunt' + id 'nebula.grunt' } node { diff --git a/src/integTest/groovy/com/moowork/gradle/grunt/Grunt_integTest.groovy b/src/integTest/groovy/com/moowork/gradle/grunt/Grunt_integTest.groovy index a340565..ebef7a2 100644 --- a/src/integTest/groovy/com/moowork/gradle/grunt/Grunt_integTest.groovy +++ b/src/integTest/groovy/com/moowork/gradle/grunt/Grunt_integTest.groovy @@ -11,7 +11,7 @@ class Grunt_integTest given: writeBuild( ''' plugins { - id 'com.moowork.grunt' + id 'nebula.grunt' } node { diff --git a/src/integTest/groovy/com/moowork/gradle/gulp/GulpInstall_integTest.groovy b/src/integTest/groovy/com/moowork/gradle/gulp/GulpInstall_integTest.groovy index 12a6043..617d069 100644 --- a/src/integTest/groovy/com/moowork/gradle/gulp/GulpInstall_integTest.groovy +++ b/src/integTest/groovy/com/moowork/gradle/gulp/GulpInstall_integTest.groovy @@ -11,7 +11,7 @@ class GulpInstall_integTest given: writeBuild( ''' plugins { - id 'com.moowork.gulp' + id 'nebula.gulp' } node { diff --git a/src/integTest/groovy/com/moowork/gradle/gulp/GulpRule_integTest.groovy b/src/integTest/groovy/com/moowork/gradle/gulp/GulpRule_integTest.groovy index 89cd6e5..c74d7ed 100644 --- a/src/integTest/groovy/com/moowork/gradle/gulp/GulpRule_integTest.groovy +++ b/src/integTest/groovy/com/moowork/gradle/gulp/GulpRule_integTest.groovy @@ -11,7 +11,7 @@ class GulpRule_integTest given: writeBuild( ''' plugins { - id 'com.moowork.gulp' + id 'nebula.gulp' } node { diff --git a/src/integTest/groovy/com/moowork/gradle/gulp/Gulp_integTest.groovy b/src/integTest/groovy/com/moowork/gradle/gulp/Gulp_integTest.groovy index dbddfbf..1484317 100644 --- a/src/integTest/groovy/com/moowork/gradle/gulp/Gulp_integTest.groovy +++ b/src/integTest/groovy/com/moowork/gradle/gulp/Gulp_integTest.groovy @@ -11,7 +11,7 @@ class Gulp_integTest given: writeBuild( ''' plugins { - id 'com.moowork.gulp' + id 'nebula.gulp' } node { diff --git a/src/integTest/groovy/com/moowork/gradle/node/npm/NpmInstall_integTest.groovy b/src/integTest/groovy/com/moowork/gradle/node/npm/NpmInstall_integTest.groovy index a7a38aa..095f1d5 100644 --- a/src/integTest/groovy/com/moowork/gradle/node/npm/NpmInstall_integTest.groovy +++ b/src/integTest/groovy/com/moowork/gradle/node/npm/NpmInstall_integTest.groovy @@ -11,7 +11,7 @@ class NpmInstall_integTest given: writeBuild( ''' plugins { - id 'com.moowork.node' + id 'nebula.node' } node { @@ -34,7 +34,7 @@ class NpmInstall_integTest given: writeBuild( ''' plugins { - id 'com.moowork.node' + id 'nebula.node' } node { npmVersion = "6.1.0" @@ -63,7 +63,7 @@ class NpmInstall_integTest given: writeBuild( ''' plugins { - id 'com.moowork.node' + id 'nebula.node' } node { diff --git a/src/integTest/groovy/com/moowork/gradle/node/npm/NpmRule_integTest.groovy b/src/integTest/groovy/com/moowork/gradle/node/npm/NpmRule_integTest.groovy index 725756f..0281588 100644 --- a/src/integTest/groovy/com/moowork/gradle/node/npm/NpmRule_integTest.groovy +++ b/src/integTest/groovy/com/moowork/gradle/node/npm/NpmRule_integTest.groovy @@ -11,7 +11,7 @@ class NpmRule_integTest given: writeBuild( ''' plugins { - id 'com.moowork.node' + id 'nebula.node' } node { @@ -34,7 +34,7 @@ class NpmRule_integTest given: writeBuild( ''' plugins { - id 'com.moowork.node' + id 'nebula.node' } node { @@ -57,7 +57,7 @@ class NpmRule_integTest given: writeBuild( ''' plugins { - id 'com.moowork.node' + id 'nebula.node' } node { npmVersion = "6.1.0" @@ -80,7 +80,7 @@ class NpmRule_integTest given: writeBuild( ''' plugins { - id 'com.moowork.node' + id 'nebula.node' } node { @@ -105,7 +105,7 @@ class NpmRule_integTest given: writeBuild( ''' plugins { - id 'com.moowork.node' + id 'nebula.node' } node { @@ -134,7 +134,7 @@ class NpmRule_integTest given: writeBuild( ''' plugins { - id 'com.moowork.node' + id 'nebula.node' } node { download = true @@ -168,7 +168,7 @@ class NpmRule_integTest given: writeBuild( ''' plugins { - id 'com.moowork.node' + id 'nebula.node' } node { npmVersion = "6.1.0" diff --git a/src/integTest/groovy/com/moowork/gradle/node/task/Node_integTest.groovy b/src/integTest/groovy/com/moowork/gradle/node/task/Node_integTest.groovy index 6086218..30729b0 100644 --- a/src/integTest/groovy/com/moowork/gradle/node/task/Node_integTest.groovy +++ b/src/integTest/groovy/com/moowork/gradle/node/task/Node_integTest.groovy @@ -11,7 +11,7 @@ class Node_integTest given: writeBuild( ''' plugins { - id 'com.moowork.node' + id 'nebula.node' } node { @@ -41,7 +41,7 @@ class Node_integTest given: writeBuild( ''' plugins { - id 'com.moowork.node' + id 'nebula.node' } node { diff --git a/src/integTest/groovy/com/moowork/gradle/node/task/Setup_integTest.groovy b/src/integTest/groovy/com/moowork/gradle/node/task/Setup_integTest.groovy index 7a027b1..cac6269 100644 --- a/src/integTest/groovy/com/moowork/gradle/node/task/Setup_integTest.groovy +++ b/src/integTest/groovy/com/moowork/gradle/node/task/Setup_integTest.groovy @@ -18,7 +18,7 @@ class Setup_integTest given: writeBuild( ''' plugins { - id 'com.moowork.node' + id 'nebula.node' } node { @@ -39,7 +39,7 @@ class Setup_integTest given: writeBuild( ''' plugins { - id 'com.moowork.node' + id 'nebula.node' } node { @@ -62,7 +62,7 @@ class Setup_integTest given: writeBuild( ''' plugins { - id 'com.moowork.node' + id 'nebula.node' } node { @@ -85,7 +85,7 @@ class Setup_integTest given: writeBuild( ''' plugins { - id 'com.moowork.node' + id 'nebula.node' } node { @@ -108,7 +108,7 @@ class Setup_integTest given: writeBuild( ''' plugins { - id 'com.moowork.node' + id 'nebula.node' } node { diff --git a/src/integTest/groovy/com/moowork/gradle/node/yarn/YarnInstall_integTest.groovy b/src/integTest/groovy/com/moowork/gradle/node/yarn/YarnInstall_integTest.groovy index 3ce30f8..9132c12 100644 --- a/src/integTest/groovy/com/moowork/gradle/node/yarn/YarnInstall_integTest.groovy +++ b/src/integTest/groovy/com/moowork/gradle/node/yarn/YarnInstall_integTest.groovy @@ -11,7 +11,7 @@ class YarnInstall_integTest given: writeBuild( ''' plugins { - id 'com.moowork.node' + id 'nebula.node' } node { @@ -36,7 +36,7 @@ class YarnInstall_integTest given: writeBuild( ''' plugins { - id 'com.moowork.node' + id 'nebula.node' } node { yarnVersion = "1.15.2" @@ -66,7 +66,7 @@ class YarnInstall_integTest given: writeBuild( ''' plugins { - id 'com.moowork.node' + id 'nebula.node' } node { diff --git a/src/integTest/groovy/com/moowork/gradle/node/yarn/YarnRule_integTest.groovy b/src/integTest/groovy/com/moowork/gradle/node/yarn/YarnRule_integTest.groovy index e67161b..776059c 100644 --- a/src/integTest/groovy/com/moowork/gradle/node/yarn/YarnRule_integTest.groovy +++ b/src/integTest/groovy/com/moowork/gradle/node/yarn/YarnRule_integTest.groovy @@ -11,7 +11,7 @@ class YarnRule_integTest given: writeBuild( ''' plugins { - id 'com.moowork.node' + id 'nebula.node' } node { @@ -35,7 +35,7 @@ class YarnRule_integTest given: writeBuild( ''' plugins { - id 'com.moowork.node' + id 'nebula.node' } node { diff --git a/src/main/groovy/com/moowork/gradle/node/task/SetupTask.groovy b/src/main/groovy/com/moowork/gradle/node/task/SetupTask.groovy index a08906e..7242af2 100644 --- a/src/main/groovy/com/moowork/gradle/node/task/SetupTask.groovy +++ b/src/main/groovy/com/moowork/gradle/node/task/SetupTask.groovy @@ -185,6 +185,9 @@ class SetupTask artifact 'v[revision]/[artifact](-v[revision]-[classifier]).[ext]' ivy 'v[revision]/ivy.xml' } + metadataSources { + artifact() + } } } else { this.repo = this.project.repositories.ivy { diff --git a/src/main/resources/META-INF/gradle-plugins/nebula.grunt.properties b/src/main/resources/META-INF/gradle-plugins/nebula.grunt.properties new file mode 100644 index 0000000..230b729 --- /dev/null +++ b/src/main/resources/META-INF/gradle-plugins/nebula.grunt.properties @@ -0,0 +1 @@ +implementation-class=com.moowork.gradle.grunt.GruntPlugin diff --git a/src/main/resources/META-INF/gradle-plugins/nebula.gulp.properties b/src/main/resources/META-INF/gradle-plugins/nebula.gulp.properties new file mode 100644 index 0000000..ce6ba11 --- /dev/null +++ b/src/main/resources/META-INF/gradle-plugins/nebula.gulp.properties @@ -0,0 +1 @@ +implementation-class=com.moowork.gradle.gulp.GulpPlugin diff --git a/src/main/resources/META-INF/gradle-plugins/nebula.node.properties b/src/main/resources/META-INF/gradle-plugins/nebula.node.properties new file mode 100644 index 0000000..8697ad1 --- /dev/null +++ b/src/main/resources/META-INF/gradle-plugins/nebula.node.properties @@ -0,0 +1 @@ +implementation-class=com.moowork.gradle.node.NodePlugin diff --git a/src/test/groovy/com/moowork/gradle/grunt/AbstractTaskTest.groovy b/src/test/groovy/com/moowork/gradle/grunt/AbstractTaskTest.groovy index cf3f4d9..a47cdd4 100644 --- a/src/test/groovy/com/moowork/gradle/grunt/AbstractTaskTest.groovy +++ b/src/test/groovy/com/moowork/gradle/grunt/AbstractTaskTest.groovy @@ -24,7 +24,7 @@ abstract class AbstractTaskTest this.execResult = Mock( ExecResult ) - this.project.apply plugin: 'com.moowork.grunt' + this.project.apply plugin: 'nebula.grunt' this.ext = NodeExtension.get( this.project ) mockExec() diff --git a/src/test/groovy/com/moowork/gradle/grunt/GruntPluginTest.groovy b/src/test/groovy/com/moowork/gradle/grunt/GruntPluginTest.groovy index 12d4353..a12c5d6 100644 --- a/src/test/groovy/com/moowork/gradle/grunt/GruntPluginTest.groovy +++ b/src/test/groovy/com/moowork/gradle/grunt/GruntPluginTest.groovy @@ -8,7 +8,7 @@ class GruntPluginTest def 'check default tasks'() { when: - this.project.apply plugin: 'com.moowork.grunt' + this.project.apply plugin: 'nebula.grunt' this.project.evaluate() then: diff --git a/src/test/groovy/com/moowork/gradle/gulp/AbstractTaskTest.groovy b/src/test/groovy/com/moowork/gradle/gulp/AbstractTaskTest.groovy index b49aacc..dd7f977 100644 --- a/src/test/groovy/com/moowork/gradle/gulp/AbstractTaskTest.groovy +++ b/src/test/groovy/com/moowork/gradle/gulp/AbstractTaskTest.groovy @@ -24,7 +24,7 @@ abstract class AbstractTaskTest this.execResult = Mock( ExecResult ) - this.project.apply plugin: 'com.moowork.gulp' + this.project.apply plugin: 'nebula.gulp' this.ext = NodeExtension.get( this.project ) mockExec() diff --git a/src/test/groovy/com/moowork/gradle/gulp/GulpPluginTest.groovy b/src/test/groovy/com/moowork/gradle/gulp/GulpPluginTest.groovy index d3bf549..57b2248 100644 --- a/src/test/groovy/com/moowork/gradle/gulp/GulpPluginTest.groovy +++ b/src/test/groovy/com/moowork/gradle/gulp/GulpPluginTest.groovy @@ -8,7 +8,7 @@ class GulpPluginTest def 'check default tasks'() { when: - this.project.apply plugin: 'com.moowork.gulp' + this.project.apply plugin: 'nebula.gulp' this.project.evaluate() then: diff --git a/src/test/groovy/com/moowork/gradle/node/NodeExtensionTest.groovy b/src/test/groovy/com/moowork/gradle/node/NodeExtensionTest.groovy index dfadeb8..b73ab1f 100644 --- a/src/test/groovy/com/moowork/gradle/node/NodeExtensionTest.groovy +++ b/src/test/groovy/com/moowork/gradle/node/NodeExtensionTest.groovy @@ -8,7 +8,7 @@ class NodeExtensionTest def "check default values for extension"() { when: - this.project.apply plugin: 'com.moowork.node' + this.project.apply plugin: 'nebula.node' def ext = NodeExtension.get( this.project ) then: diff --git a/src/test/groovy/com/moowork/gradle/node/NodePluginTest.groovy b/src/test/groovy/com/moowork/gradle/node/NodePluginTest.groovy index ff76a72..a130e68 100644 --- a/src/test/groovy/com/moowork/gradle/node/NodePluginTest.groovy +++ b/src/test/groovy/com/moowork/gradle/node/NodePluginTest.groovy @@ -17,7 +17,7 @@ class NodePluginTest def 'check default tasks'() { when: - this.project.apply plugin: 'com.moowork.node' + this.project.apply plugin: 'nebula.node' this.project.evaluate() then: @@ -30,7 +30,7 @@ class NodePluginTest def 'check repository and dependencies (no download)'() { when: - this.project.apply plugin: 'com.moowork.node' + this.project.apply plugin: 'nebula.node' this.project.evaluate() then: @@ -41,7 +41,7 @@ class NodePluginTest def 'check npm rule task'() { when: - this.project.apply plugin: 'com.moowork.node' + this.project.apply plugin: 'nebula.node' this.project.evaluate() then: diff --git a/src/test/groovy/com/moowork/gradle/node/task/AbstractTaskTest.groovy b/src/test/groovy/com/moowork/gradle/node/task/AbstractTaskTest.groovy index 4fff15d..cf73f23 100644 --- a/src/test/groovy/com/moowork/gradle/node/task/AbstractTaskTest.groovy +++ b/src/test/groovy/com/moowork/gradle/node/task/AbstractTaskTest.groovy @@ -24,7 +24,7 @@ abstract class AbstractTaskTest this.execResult = Mock( ExecResult ) - this.project.apply plugin: 'com.moowork.node' + this.project.apply plugin: 'nebula.node' this.ext = NodeExtension.get( this.project ) mockExec()