Skip to content

Commit e8da8e9

Browse files
committed
Remove the jar-dependencies and 1.7 checks for the jar plugin
See #319
1 parent de864bc commit e8da8e9

File tree

3 files changed

+0
-66
lines changed

3 files changed

+0
-66
lines changed

jar-plugin/src/main/groovy/com/github/jrubygradle/jar/JRubyJar.groovy

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ class JRubyJar extends Jar {
6868
void jrubyVersion(String version) {
6969
logger.info("setting jrubyVersion to ${version} from ${embeddedJRubyVersion}")
7070
embeddedJRubyVersion = version
71-
addEmbeddedDependencies(project.configurations.getByName(configuration))
7271
}
7372

7473
/**
@@ -94,7 +93,6 @@ class JRubyJar extends Jar {
9493
void jrubyMainsVersion(String version) {
9594
logger.info("setting jrubyMainsVersion to ${version} from ${embeddedJRubyMainsVersion}")
9695
embeddedJRubyMainsVersion = version
97-
addEmbeddedDependencies(project.configurations.getByName(configuration))
9896
}
9997

10098
/**
@@ -241,7 +239,6 @@ class JRubyJar extends Jar {
241239

242240
JRubyJar() {
243241
appendix = 'jruby'
244-
addEmbeddedDependencies(project.configurations.maybeCreate(DEFAULT_JRUBYJAR_CONFIG))
245242
/* Make sure our default configuration is present regardless of whether we use it or not */
246243
prepareTask = project.task("prepare${prepareNameForSuffix(name)}", type: JRubyPrepare)
247244
dependsOn prepareTask
@@ -270,13 +267,6 @@ class JRubyJar extends Jar {
270267
project.dependencies.add(customConfigName, "org.jruby.mains:jruby-mains:${getJrubyMainsVersion()}")
271268
}
272269

273-
/** Add the necessary JRuby dependencies to the specified {@code org.gradle.api.artifacts.Configuration} */
274-
void addEmbeddedDependencies(Configuration config) {
275-
/* To ensure that we can load our jars properly, we should always have
276-
* jar-dependencies in our resolution graph */
277-
project.dependencies.add(config.name, 'rubygems:jar-dependencies:[0.1.15,)')
278-
}
279-
280270
/** Update the staging directory and tasks responsible for setting it up */
281271
void updateStageDirectory() {
282272
File dir = project.file("${project.buildDir}/dirinfo/${configuration}")

jar-plugin/src/main/groovy/com/github/jrubygradle/jar/JRubyJarPlugin.groovy

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -22,38 +22,6 @@ class JRubyJarPlugin implements Plugin<Project> {
2222
project.tasks.create('jrubyJar', JRubyJar)
2323

2424
updateTestTask(project)
25-
26-
project.afterEvaluate {
27-
checkJRubyVersions(project)
28-
}
29-
}
30-
31-
/**
32-
* Check our configured jruby versions to see if any of them are old enough
33-
* to cause problems with a packed jar
34-
* <https://github.com/jruby-gradle/jruby-gradle-plugin/issues/191>
35-
*/
36-
void checkJRubyVersions(Project project) {
37-
project.tasks.each { Task task ->
38-
if ((task instanceof JRubyJar) && (task.scriptName != JRubyJar.Type.LIBRARY)) {
39-
if (isJRubyVersionDeprecated(task.jrubyVersion)) {
40-
project.logger.warn('The task `{}` is using JRuby {} which may cause unexpected behavior, see <http://jruby-gradle.org/errors/jar-deprecated-jrubyversion> for more',
41-
task.name, task.jrubyVersion)
42-
}
43-
}
44-
}
45-
}
46-
47-
/**
48-
* Determine whether the version of the JRuby provided is deprecated as far
49-
* as the jar plugin is concerned. Deprecated means that the version is unlikely
50-
* to produce a useful artifact due to missing functionality in JRuby core
51-
*
52-
* @param version
53-
* @return True if we consider this version deprecated/problematic for the jar plugin
54-
*/
55-
boolean isJRubyVersionDeprecated(String version) {
56-
return (version.matches(/1.7.1(\d+)/)) as boolean
5725
}
5826

5927
@PackageScope

jar-plugin/src/test/groovy/com/github/jrubygradle/jar/JRubyPluginInstanceSpec.groovy

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)