// TODO: Remove this block once rubygems.lasagna.io is back, or jruby-gradle-jar-plugin is upgraded to 1.5.0. // See also: https://github.com/jruby-gradle/jruby-gradle-plugin/issues/297 // jruby-gradle-jar-plugin is not upgraded yet because its 1.5.0 depends on Java 8. repositories { mavenLocal() maven { url 'http://rubygems-proxy.torquebox.org/releases' } } apply plugin: "com.github.jruby-gradle.jar" // include ruby scripts to jar. don't use sourceSets.main.resources.srcDirs // because IntelliJ causes error if srcDirs includes files out of projectDir. processResources.from("${rootProject.projectDir}/lib/", "${buildDir}/gemlib") configurations { // com.google.inject:guice depends on asm and cglib but version of the libraries conflict // with ones bundled in jruby-complete and cause bytecode compatibility error compile.exclude group: 'asm', module: 'asm' compile.exclude group: 'org.sonatype.sisu.inject', module: 'cglib' } import com.github.jrubygradle.JRubyExec import com.github.jrubygradle.JRubyPrepare // determine which dependencies have updates: $ gradle dependencyUpdates dependencies { compile project(':embulk-jruby-strptime') compile 'org.embulk:guice-bootstrap:0.1.1' compile 'com.google.guava:guava:18.0' compile 'com.google.inject:guice:4.0' compile 'com.google.inject.extensions:guice-multibindings:4.0' compile 'javax.inject:javax.inject:1' compile 'com.fasterxml.jackson.core:jackson-annotations:2.6.7' compile 'com.fasterxml.jackson.core:jackson-core:2.6.7' compile 'com.fasterxml.jackson.core:jackson-databind:2.6.7' compile 'com.fasterxml.jackson.datatype:jackson-datatype-guava:2.6.7' compile 'com.fasterxml.jackson.datatype:jackson-datatype-joda:2.6.7' compile 'com.fasterxml.jackson.module:jackson-module-guice:2.6.7' compile 'ch.qos.logback:logback-classic:1.1.3' compile 'org.slf4j:slf4j-api:1.7.12' compile 'org.jruby:jruby-complete:' + project.jrubyVersion compile 'com.google.code.findbugs:annotations:3.0.0' compile 'org.yaml:snakeyaml:1.18' compile 'javax.validation:validation-api:1.1.0.Final' compile 'org.apache.bval:bval-jsr303:0.5' compile 'io.airlift:slice:0.9' compile 'joda-time:joda-time:2.9.2' compile 'io.netty:netty-buffer:4.0.44.Final' compile 'org.fusesource.jansi:jansi:1.11' compile 'org.msgpack:msgpack-core:0.8.11' // For embulk/guess/charset.rb. See also embulk.gemspec compile 'com.ibm.icu:icu4j:54.1.1' // For MavenPluginSource / MavenArtifactFinder. compile 'org.eclipse.aether:aether-api:1.1.0' compile 'org.eclipse.aether:aether-spi:1.1.0' compile 'org.eclipse.aether:aether-util:1.1.0' compile 'org.eclipse.aether:aether-impl:1.1.0' compile 'org.apache.maven:maven-aether-provider:3.3.9' gems 'rubygems:bundler:1.10.6' gems 'rubygems:msgpack:1.1.0' gems 'rubygems:liquid:3.0.6' } task unpackGems(type: JRubyPrepare) { outputDir file("${buildDir}/gem") dependencies configurations.gems doLast { // move to build/gem/*/lib/* to build/gemlib/ file("${buildDir}/gem/gems").eachDir { gemDir -> copy { from "${gemDir}/lib" into "${buildDir}/gemlib/" include "**" } } fileTree(dir: "${buildDir}/gemlib", include: "**/.jrubydir").each { f -> f.delete() } } } processResources.dependsOn("unpackGems")