From 81b0e9cce76947d821a5dd834f05b4cec5b67657 Mon Sep 17 00:00:00 2001 From: Karol Bucek Date: Thu, 14 Jan 2021 15:59:58 +0100 Subject: [PATCH] Build: run task to update RGs to 3.2 --- build.gradle | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index bb352082902..e14b2182cb2 100644 --- a/build.gradle +++ b/build.gradle @@ -203,16 +203,32 @@ def assemblyDeps = [downloadAndInstallJRuby, assemble] + subprojects.collect { tasks.register("installBundler") { dependsOn assemblyDeps outputs.files file("${projectDir}/vendor/bundle/jruby/2.5.0/bin/bundle") + doLast { + gem(projectDir, buildDir, "bundler", "~> 2", "${projectDir}/vendor/bundle/jruby/2.5.0") + } +} + +tasks.register("updateRubygems", Exec) { + dependsOn assemblyDeps + + // RGs 3.2 also packages Bundler -> will end up being a (stdlib) builtin library + outputs.files file("${projectDir}/vendor/jruby/bin/bundle") + + workingDir "${projectDir}/vendor/jruby" + commandLine 'bin/jruby', '-S', 'gem', 'update', '--system', '3.2.5' + + // NOTE: after the upgrade we could uninstall the rubygems-update gem +} doLast { gem(projectDir, buildDir, "bundler", "~> 2", "${projectDir}/vendor/bundle/jruby/2.5.0") } } tasks.register("bootstrap"){ - dependsOn installBundler + dependsOn updateRubygems doLast { setupJruby(projectDir, buildDir) - } + } }