Skip to content

Commit

Permalink
fix tests and support for grunt/gulp/node in gradle 6
Browse files Browse the repository at this point in the history
  • Loading branch information
rpalcolea committed Nov 27, 2019
1 parent f637d45 commit 3bbb4e6
Show file tree
Hide file tree
Showing 25 changed files with 48 additions and 42 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)*
Expand All @@ -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)*
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class GruntInstall_integTest
given:
writeBuild( '''
plugins {
id 'com.moowork.grunt'
id 'nebula.grunt'
}
node {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class GruntRule_integTest
given:
writeBuild( '''
plugins {
id 'com.moowork.grunt'
id 'nebula.grunt'
}
node {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Grunt_integTest
given:
writeBuild( '''
plugins {
id 'com.moowork.grunt'
id 'nebula.grunt'
}
node {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class GulpInstall_integTest
given:
writeBuild( '''
plugins {
id 'com.moowork.gulp'
id 'nebula.gulp'
}
node {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class GulpRule_integTest
given:
writeBuild( '''
plugins {
id 'com.moowork.gulp'
id 'nebula.gulp'
}
node {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Gulp_integTest
given:
writeBuild( '''
plugins {
id 'com.moowork.gulp'
id 'nebula.gulp'
}
node {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class NpmInstall_integTest
given:
writeBuild( '''
plugins {
id 'com.moowork.node'
id 'nebula.node'
}
node {
Expand All @@ -34,7 +34,7 @@ class NpmInstall_integTest
given:
writeBuild( '''
plugins {
id 'com.moowork.node'
id 'nebula.node'
}
node {
npmVersion = "6.1.0"
Expand Down Expand Up @@ -63,7 +63,7 @@ class NpmInstall_integTest
given:
writeBuild( '''
plugins {
id 'com.moowork.node'
id 'nebula.node'
}
node {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class NpmRule_integTest
given:
writeBuild( '''
plugins {
id 'com.moowork.node'
id 'nebula.node'
}
node {
Expand All @@ -34,7 +34,7 @@ class NpmRule_integTest
given:
writeBuild( '''
plugins {
id 'com.moowork.node'
id 'nebula.node'
}
node {
Expand All @@ -57,7 +57,7 @@ class NpmRule_integTest
given:
writeBuild( '''
plugins {
id 'com.moowork.node'
id 'nebula.node'
}
node {
npmVersion = "6.1.0"
Expand All @@ -80,7 +80,7 @@ class NpmRule_integTest
given:
writeBuild( '''
plugins {
id 'com.moowork.node'
id 'nebula.node'
}
node {
Expand All @@ -105,7 +105,7 @@ class NpmRule_integTest
given:
writeBuild( '''
plugins {
id 'com.moowork.node'
id 'nebula.node'
}
node {
Expand Down Expand Up @@ -134,7 +134,7 @@ class NpmRule_integTest
given:
writeBuild( '''
plugins {
id 'com.moowork.node'
id 'nebula.node'
}
node {
download = true
Expand Down Expand Up @@ -168,7 +168,7 @@ class NpmRule_integTest
given:
writeBuild( '''
plugins {
id 'com.moowork.node'
id 'nebula.node'
}
node {
npmVersion = "6.1.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Node_integTest
given:
writeBuild( '''
plugins {
id 'com.moowork.node'
id 'nebula.node'
}
node {
Expand Down Expand Up @@ -41,7 +41,7 @@ class Node_integTest
given:
writeBuild( '''
plugins {
id 'com.moowork.node'
id 'nebula.node'
}
node {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Setup_integTest
given:
writeBuild( '''
plugins {
id 'com.moowork.node'
id 'nebula.node'
}
node {
Expand All @@ -39,7 +39,7 @@ class Setup_integTest
given:
writeBuild( '''
plugins {
id 'com.moowork.node'
id 'nebula.node'
}

node {
Expand All @@ -62,7 +62,7 @@ class Setup_integTest
given:
writeBuild( '''
plugins {
id 'com.moowork.node'
id 'nebula.node'
}

node {
Expand All @@ -85,7 +85,7 @@ class Setup_integTest
given:
writeBuild( '''
plugins {
id 'com.moowork.node'
id 'nebula.node'
}

node {
Expand All @@ -108,7 +108,7 @@ class Setup_integTest
given:
writeBuild( '''
plugins {
id 'com.moowork.node'
id 'nebula.node'
}

node {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class YarnInstall_integTest
given:
writeBuild( '''
plugins {
id 'com.moowork.node'
id 'nebula.node'
}
node {
Expand All @@ -36,7 +36,7 @@ class YarnInstall_integTest
given:
writeBuild( '''
plugins {
id 'com.moowork.node'
id 'nebula.node'
}
node {
yarnVersion = "1.15.2"
Expand Down Expand Up @@ -66,7 +66,7 @@ class YarnInstall_integTest
given:
writeBuild( '''
plugins {
id 'com.moowork.node'
id 'nebula.node'
}
node {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class YarnRule_integTest
given:
writeBuild( '''
plugins {
id 'com.moowork.node'
id 'nebula.node'
}
node {
Expand All @@ -35,7 +35,7 @@ class YarnRule_integTest
given:
writeBuild( '''
plugins {
id 'com.moowork.node'
id 'nebula.node'
}
node {
Expand Down
3 changes: 3 additions & 0 deletions src/main/groovy/com/moowork/gradle/node/task/SetupTask.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
implementation-class=com.moowork.gradle.grunt.GruntPlugin
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
implementation-class=com.moowork.gradle.gulp.GulpPlugin
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
implementation-class=com.moowork.gradle.node.NodePlugin
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions src/test/groovy/com/moowork/gradle/node/NodePluginTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 3bbb4e6

Please sign in to comment.