Make the word-count example a gradleTest while we're at it

This commit is contained in:
R. Tyler Croy 2015-08-10 09:31:27 -07:00
parent aba9b2f234
commit 4d1dc25e59
No known key found for this signature in database
GPG Key ID: 1426C7DC3F51E16F
3 changed files with 21 additions and 7 deletions

View File

@ -32,8 +32,10 @@ dependencies {
compile gradleApi()
compile localGroovy()
['jruby-gradle-plugin', 'jruby-gradle-jar-plugin'].each {
compile "com.github.jruby-gradle:${it}:${jrubyGradleMinVersion}"
['jruby-gradle-plugin', 'jruby-gradle-jar-plugin'].each { String plugin ->
String pluginDependency = "com.github.jruby-gradle:${plugin}:${jrubyGradleMinVersion}"
compile pluginDependency
gradleTest pluginDependency
}
compile 'com.github.jengelman.gradle.plugins:shadow:1.2.2+'
@ -56,7 +58,8 @@ test {
}
gradleTest {
versions '2.0', '2.2', '2.4'
versions '2.0', '2.2', '2.4', '2.6'
dependsOn jar
}
task sourcesJar(type: Jar, dependsOn: classes) {

View File

@ -1,18 +1,28 @@
buildscript {
repositories {
jcenter()
mavenLocal()
}
dependencies {
classpath 'com.github.jruby-gradle:jruby-gradle-storm-plugin:0.2.0'
//classpath 'com.github.jruby-gradle:jruby-gradle-storm-plugin:0.2.0'
/* Replace "%%VERSION%%" with the version of JRuby/Gradle Storm you wish to
* use if you want to use this build.gradle outside of gradleTest
*/
classpath 'com.github.jruby-gradle:jruby-gradle-storm-plugin:%%VERSION%%'
classpath 'com.github.jruby-gradle:jruby-gradle-plugin:1.0.1'
classpath 'com.github.jruby-gradle:jruby-gradle-jar-plugin:1.0.1'
}
}
apply plugin: 'com.github.jruby-gradle.storm'
import com.github.jrubygradle.storm.JRubyStorm
jrubyStorm {
topology 'hello-topology.rb'
}
/*
* This task is only here for the execution of the gradleTest
*/
task runGradleTest {
dependsOn jrubyStorm
}

1
src/gradleTest/word-count Symbolic link
View File

@ -0,0 +1 @@
../../examples/word-count