Skip to content

Commit 4f076f2

Browse files
authored
Merge pull request #354 from rtyler/remove-1.7-319
Remove support for JRuby 1.7 compatibility
2 parents 1511cfd + 89a8b4f commit 4f076f2

File tree

10 files changed

+15
-77
lines changed

10 files changed

+15
-77
lines changed

README.adoc

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,16 @@ image::https://badges.gitter.im/Join%20Chat.svg[link="https://gitter.im/jruby-gr
99

1010
You can also join us on the link:https://groups.google.com/forum/#!forum/jruby-gradle[JRuby/Gradle mailing list]
1111

12-
The purpose of these plugins is to bundle useful link:http://gradle.org[Gradle]
13-
functionality for JRuby projects. Use of this plugin replaces the need for both link:http://bundler.io[Bundler] and link:https://github.com/jruby/warbler[Warbler].
12+
JRuby/Gradle brings the power and flexibility of
13+
link:http://gradle.org[Gradle]
14+
to the Ruby ecosystem! With JRuby/Gradle you can specify your Java and Ruby dependencies together, build jar files, run tests, and much more!.
1415

1516

16-
The Ruby gem dependency code for this project relies on the link:http://rubygems.lasagna.io/proxy/maven/releases[Rubygems Maven
17-
proxy] operated by link:https://github.com/rtyler[R. Tyler Croy]
17+
Use of this plugin replaces the need for Rake, link:http://bundler.io[Bundler]
18+
and link:https://github.com/jruby/warbler[Warbler].
19+
20+
21+
NOTE: JRuby/Gradle 2.0 relies on JRuby 9.x and later.
1822

1923

2024
This repository contains the:
@@ -24,5 +28,4 @@ This repository contains the:
2428
* `war` (in `jruby-gradle-war-plugin/`): packaging JRuby-based `.war` files
2529
2630
27-
2831
NOTE: More documentation can be found on link:http://jruby-gradle.org[jruby-gradle.org]

docs/base.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
:page-layout: base
33
:toc: right
44

5-
include::./../jruby-gradle-base-plugin/README.adoc[]
5+
include::./../base-plugin/README.adoc[]

docs/errors/jar-deprecated-jrubyversion.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ JRuby in an "embedded" scenario more reliable. Packing a `JRubyJar` being a
1010
fairly typical "embedded JRuby" use-case, there is certain functionality that
1111
relies on these improvements.
1212

13+
14+
NOTE: As of JRuby/Gradle 2.0.0, the JRuby 1.7.x releases are no longer supported.
15+
1316
This does **not** mean older versions of JRuby won't work in `JRubyJar`
1417
archives but rather: you are _likely_ going to experience problems with a more
1518
complex use-case on an older JRuby. For example, Rails applications will not

docs/index.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ link:http://jruby.org[JRuby] with Gradle's excellent task and dependency
1010
management, *JRuby/Gradle* provides high quality build tooling for
1111
Ruby and Java developers alike.
1212

13-
NOTE: As from version 1.6.0 you will need at last Gradle 2.8.
13+
NOTE: As from version 2.0.0 you will need at least Gradle 4.2.
1414

1515
*Plugins available:*
1616

docs/jar.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
:page-layout: base
33
:toc: right
44

5-
include::./../jruby-gradle-jar-plugin/README.adoc[]
5+
include::./../jar-plugin/README.adoc[]

docs/start.adoc

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

docs/war.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
:page-layout: base
33
:toc: right
44

5-
include::./../jruby-gradle-war-plugin/README.adoc[]
5+
include::./../war-plugin/README.adoc[]

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)