Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jeremyd
Created October 20, 2015 02:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeremyd/b0952caebe50d039629c to your computer and use it in GitHub Desktop.
Save jeremyd/b0952caebe50d039629c to your computer and use it in GitHub Desktop.
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