-
-
Save jeremyd/b0952caebe50d039629c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
repositories { jcenter() } | |
dependencies { | |
/* check jruby-gradle.org for the latest release */ | |
classpath 'com.github.jruby-gradle:jruby-gradle-jar-plugin:+' | |
classpath "com.github.jruby-gradle:jruby-gradle-plugin:1.1.4" | |
classpath "com.amazonaws:amazon-kinesis-client:1.6.1" | |
classpath "com.amazonaws:aws-java-sdk:1.10.27" | |
classpath "com.amazonaws:aws-java-sdk-kinesis:1.10.27" | |
} | |
} | |
apply plugin: 'java' | |
apply plugin: 'com.github.jruby-gradle.base' | |
apply plugin: "com.github.jruby-gradle.jar" | |
import com.github.jrubygradle.JRubyExec | |
configurations { | |
/* option A: bundle all the dependencies from the 'runtime' Configuration */ | |
jrubyJar.extendsFrom runtime | |
} | |
dependencies { | |
/* Using the built-in `jrubyExec` configuration to describe the | |
* dependencies our JRubyExec-based tasks will need | |
*/ | |
runtime group: 'com.amazonaws', name: 'amazon-kinesis-client', version: '1.6.1' | |
runtime group: 'com.amazonaws', name: 'aws-java-sdk', version: '1.10.27' | |
runtime group: 'com.amazonaws', name: 'aws-java-sdk-kinesis', version: '1.10.27' | |
} | |
jrubyJar { | |
initScript "${projectDir}/prints" | |
} | |
task runGradleTest(type: Exec) { | |
dependsOn jrubyJar | |
description "Execute the constructed self-executing jar" | |
environment [:] | |
workingDir "${buildDir}/libs" | |
commandLine 'java', '-jar', jrubyJar.outputs.files.singleFile.absolutePath | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment