Skip to content

Commit b91ab75

Browse files
committed
Rolled back to jruby-complete 1.7.13 as the default version due to issues we have been seeing with 1.7.14. Added support for Warbler Bootstrap so that derived plugins can easily make use of it also allowing the user to control the version
1 parent 33914ca commit b91ab75

File tree

3 files changed

+56
-4
lines changed

3 files changed

+56
-4
lines changed

src/main/groovy/com/github/jrubygradle/JRubyPlugin.groovy

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ class JRubyPlugin implements Plugin<Project> {
3030
}
3131

3232
project.configurations.create(JRubyExec.JRUBYEXEC_CONFIG)
33-
// MOVE: project.configurations.create(JRubyJar.JRUBYJAR_CONFIG)
3433
JRubyExecDelegate.addToProject(project)
3534

3635
// In order for jrubyWar to work we'll need to pull in the warbler
@@ -43,8 +42,6 @@ class JRubyPlugin implements Plugin<Project> {
4342
}
4443
}
4544

46-
47-
4845
JRubyExec.updateJRubyDependencies(project)
4946
}
5047

src/main/groovy/com/github/jrubygradle/JRubyPluginExtension.groovy

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class JRubyPluginExtension {
77
/** The default version of jruby that will be used by jrubyWar
88
*
99
*/
10-
String defaultVersion = '1.7.14'
10+
String defaultVersion = '1.7.13'
1111

1212
/** Directory for jrubyPrepare to install .gem dependencies into
1313
*
@@ -19,8 +19,18 @@ class JRubyPluginExtension {
1919
*/
2020
String execVersion = defaultVersion
2121

22+
/** Setting the warbler bootstrap version that can be used for dependencies
23+
* By default it will use any version 1.0 or better. Setting this property
24+
* allows for locking down the build to one specific version.
25+
*
26+
* @since 0.1.2
27+
*/
28+
@Incubating
29+
String warblerBootstrapVersion = '1.+'
30+
2231
/** Set this to false if you do not want the default set of repositories to be loaded.
2332
*
33+
* @since 0.1.1
2434
*/
2535
@Incubating
2636
boolean defaultRepositories = true
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
package com.github.jrubygradle.internal
2+
3+
import org.gradle.api.Project
4+
5+
/** Utilities for add Warbler Bootstrap Dependencies so that other jruby gradle plugins can utilise common code
6+
*
7+
* @author Schalk W. Cronjé
8+
* @since 0.1.2
9+
*/
10+
class WarblerBootstrap {
11+
12+
static final String GROUP = 'com.lookout'
13+
static final String ARTIFACT = 'warbler-bootstrap'
14+
15+
/** Adds the dependency to the Project using {@code jruby , warbkerBootstrapVersion} as the version
16+
* Dependency will be added to the {@code jrubyEmbeds configuration.
17+
*/
18+
static void addDependency(Project project) {
19+
project.dependencies {
20+
jrubyEmbeds group: GROUP, name: ARTIFACT, version: project.extensions.getByName('jruby').warblerBootstrapVersion
21+
}
22+
}
23+
24+
/** Adds a specific version the dependency to the Project.
25+
* Dependency will be added to the {@code jrubyEmbeds configuration.
26+
*
27+
* @param project Project to add dependency to
28+
* @param version Version of warbler-bootstrap
29+
*/
30+
static void addDependency(Project project,final String version) {
31+
project.dependencies {
32+
jrubyEmbeds group: GROUP, name: ARTIFACT, version: version
33+
}
34+
}
35+
36+
/** Adds a specific version of the dependency to a name configuration of the Project.
37+
*
38+
* @param project Project to add dependency to
39+
* @param version Version of warbler-bootstrap
40+
* @param configuration Name of configuration
41+
*/
42+
static void addDependency(Project project,final String version,final String configuration) {
43+
project.dependencies.add(configuration,"${GROUP}:${ARTIFACT}:${version}")
44+
}
45+
}

0 commit comments

Comments
 (0)