Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround for #14873 #14890

Merged
merged 8 commits into from
Feb 11, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fine tune dependencies
jsvd committed Feb 10, 2023
commit f6f94c80a5f95c0ed1052a05b0026379110828f9
1 change: 1 addition & 0 deletions logstash-core/build.gradle
Original file line number Diff line number Diff line change
@@ -157,6 +157,7 @@ idea {
dependencies {
api(files("../vendor/jruby/lib/jruby.jar") { // jruby-core.jar
builtBy ':downloadAndInstallJRuby'
builtBy ':downloadAndInstallPreviousJRubyFFI'
}) { because "DEPENDENCY: org.jruby:jruby-core:${jrubyVersion}" } // meta-data for generateLicenseReport
implementation project(':jvm-options-parser')
implementation "org.apache.logging.log4j:log4j-api:${log4jVersion}"
23 changes: 13 additions & 10 deletions rubyUtils.gradle
Original file line number Diff line number Diff line change
@@ -212,15 +212,6 @@ def customJRubyDir = project.hasProperty("custom.jruby.path") ? project.property
def customJRubyVersion = customJRubyDir == "" ? "" : Files.readAllLines(Paths.get(customJRubyDir, "VERSION")).get(0).trim()
def customJRubyTar = customJRubyDir == "" ? "" : (customJRubyDir + "/maven/jruby-dist/target/jruby-dist-${customJRubyVersion}-bin.tar.gz")

tasks.register("downloadPreviousJRuby", Download) {
description "Download previous JRuby artifact from this specific URL: ${previousJRubyURL}"
src previousJRubyURL
onlyIfNewer true
inputs.file(versionsPath)
outputs.file(jrubyTarPath)
dest new File("${projectDir}/vendor/_", "jruby-dist-${previousJRubyVersion}-bin.tar.gz")
}

tasks.register("downloadJRuby", Download) {
description "Download JRuby artifact from this specific URL: ${jRubyURL}"
src jRubyURL
@@ -230,6 +221,15 @@ tasks.register("downloadJRuby", Download) {
dest new File("${projectDir}/vendor/_", "jruby-dist-${jRubyVersion}-bin.tar.gz")
}

tasks.register("downloadPreviousJRuby", Download) {
description "Download previous JRuby artifact from this specific URL: ${previousJRubyURL}"
src previousJRubyURL
onlyIfNewer true
inputs.file(versionsPath)
outputs.file(previousJrubyTarPath)
dest new File("${projectDir}/vendor/_", "jruby-dist-${previousJRubyVersion}-bin.tar.gz")
}

downloadJRuby.onlyIf { customJRubyDir == "" }

tasks.register("verifyFile", Verify) {
@@ -297,7 +297,10 @@ tasks.register("downloadAndInstallPreviousJRubyFFI", Copy) {
dependsOn=[downloadPreviousJRuby]
description "Install previous JRuby FFI files in the new JRuby directory"
inputs.file(previousJrubyTarPath)
outputs.dir("${projectDir}/vendor/jruby")
outputs.dir("${projectDir}/vendor/jruby/lib/jni/aarch64-Linux")
outputs.dir("${projectDir}/vendor/jruby/lib/jni/arm-Linux")
outputs.dir("${projectDir}/vendor/jruby/lib/jni/i386-Linux")
outputs.dir("${projectDir}/vendor/jruby/lib/jni/x86_64-Linux")
from tarTree(downloadPreviousJRuby.dest)
eachFile { f ->
f.path = f.path.replaceFirst("^jruby-${previousJRubyVersion}", '')