Skip to content

Commit

Permalink
updated gradle-node-plugin to version 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
cniesen committed Dec 11, 2017
1 parent 2252864 commit 6163819
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Expand Up @@ -16,7 +16,7 @@ group = 'net.eikehirsch.react'

dependencies {
// compile gradleApi() // added by the plugindev-plugin
compile 'com.moowork.gradle:gradle-node-plugin:0.9'
compile 'com.moowork.gradle:gradle-node-plugin:1.1.0'
testCompile 'junit:junit:4.11'
testCompile( 'org.spockframework:spock-core:0.7-groovy-2.0' ) {
exclude module: 'groovy-all'
Expand Down
12 changes: 6 additions & 6 deletions src/main/groovy/net/eikehirsch/gradle/react/JSXTask.groovy
Expand Up @@ -18,8 +18,8 @@ class JSXTask extends NodeTask {

@OutputDirectory destDir

JSXOptions options = new JSXOptions()
JSXOptions jsxOptions = new JSXOptions()


JSXTask() {
this.group = 'React'
Expand All @@ -32,7 +32,7 @@ class JSXTask extends NodeTask {
JSXExtension config = project.extensions.getByName(JSXExtension.NAME) as JSXExtension
sourcesDir = config.sourcesDir ?: DEFAULT_SOURCES_DIR
destDir = config.destDir ?: DEFAULT_DEST_DIR
options = config.getOptions() ?: options
jsxOptions = config.getOptions() ?: jsxOptions
}

@Override
Expand All @@ -51,7 +51,7 @@ class JSXTask extends NodeTask {
out.mkdirs()
}

def args = options.toArgsArray()
def args = jsxOptions.toArgsArray()
args << getSourcesDir().absolutePath
args << out.absolutePath
setArgs args
Expand All @@ -68,8 +68,8 @@ class JSXTask extends NodeTask {
}

@SuppressWarnings("GroovyUnusedDeclaration")
options(Closure<JSXOptions> optionsClosure) {
ConfigureUtil.configure(optionsClosure, options)
jsxOptions(Closure<JSXOptions> optionsClosure) {
ConfigureUtil.configure(optionsClosure, jsxOptions)
return this
}

Expand Down
@@ -1,6 +1,6 @@
package net.eikehirsch.gradle.react

import com.moowork.gradle.node.task.NpmTask
import com.moowork.gradle.node.npm.NpmTask

class ReactInstallTask extends NpmTask {

Expand Down
Expand Up @@ -130,7 +130,7 @@ class JSXTaskSpec extends Specification {
JSXTask task = project.tasks.jsx
task.sourcesDir == project.file('src/react')
task.destDir == project.file('out')
task.options.extension == 'jsx'
task.jsxOptions.extension == 'jsx'
}


Expand Down

0 comments on commit 6163819

Please sign in to comment.