Skip to content

Commit cdc32a1

Browse files
committed
Finished teasing out JRubyWar & JRubyJar
1 parent de88a31 commit cdc32a1

File tree

7 files changed

+5
-227
lines changed

7 files changed

+5
-227
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Fri Aug 15 18:13:15 BST 2014
1+
#Fri Aug 22 00:43:11 BST 2014
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.0-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-2.0-all.zip

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

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

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

Lines changed: 3 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ class JRubyPlugin implements Plugin<Project> {
1313
static final String RUBYGEMS_RELEASE_URL = 'http://rubygems-proxy.torquebox.org/releases'
1414

1515
void apply(Project project) {
16-
project.apply plugin: 'java'
16+
// REMOVE: project.apply plugin: 'java'
17+
1718
project.extensions.create('jruby', JRubyPluginExtension, project)
1819

1920
if (!project.repositories.metaClass.respondsTo(project.repositories, 'rubygemsRelease')) {
@@ -29,8 +30,7 @@ class JRubyPlugin implements Plugin<Project> {
2930
}
3031

3132
project.configurations.create(JRubyExec.JRUBYEXEC_CONFIG)
32-
project.configurations.create(JRubyWar.JRUBYWAR_CONFIG)
33-
project.configurations.create(JRubyJar.JRUBYJAR_CONFIG)
33+
// MOVE: project.configurations.create(JRubyJar.JRUBYJAR_CONFIG)
3434
JRubyExecDelegate.addToProject(project)
3535

3636
// In order for jrubyWar to work we'll need to pull in the warbler
@@ -46,21 +46,9 @@ class JRubyPlugin implements Plugin<Project> {
4646
}
4747
}
4848

49-
project.dependencies {
50-
jrubyEmbeds group: 'com.lookout', name: 'warbler-bootstrap', version: '1.+'
51-
}
5249

53-
// In order to update the testing cycle we need to tell unit tests where to
54-
// find GEMs. We are assuming that if someone includes this plugin, that they
55-
// will be writing tests that includes jruby and that they might need some
56-
// GEMs as part of the tests.
57-
project.tasks.test {
58-
environment GEM_HOME : project.extensions.getByName('jruby').gemInstallDir
59-
dependsOn 'jrubyPrepareGems'
60-
}
6150

6251
JRubyExec.updateJRubyDependencies(project)
63-
JRubyWar.updateJRubyDependencies(project)
6452
}
6553

6654
project.task('jrubyClean', type: Delete) {
@@ -76,37 +64,6 @@ class JRubyPlugin implements Plugin<Project> {
7664
gems project.configurations.gems
7765
outputDir project.jruby.gemInstallDir
7866
}
79-
80-
project.task('jrubyCacheJars', type: Copy) {
81-
group TASK_GROUP_NAME
82-
description 'Cache .jar-based dependencies into .jarcache/'
83-
84-
from project.configurations.jrubyWar
85-
into ".jarcache"
86-
include '**/*.jar'
87-
}
88-
89-
project.task('jrubyPrepare') {
90-
group TASK_GROUP_NAME
91-
description 'Pre-cache and prepare all dependencies (jars and gems)'
92-
dependsOn project.tasks.jrubyCacheJars, project.tasks.jrubyPrepareGems
93-
}
94-
95-
// Only jRubyWar will depend on jrubyPrepare. Other JRubyWar tasks created by
96-
// build script authors will be under their own control
97-
// jrubyWar task will use jrubyWar as configuration
98-
project.task('jrubyWar', type: JRubyWar) {
99-
group JRubyPlugin.TASK_GROUP_NAME
100-
description 'Create a JRuby-based web archive'
101-
dependsOn project.tasks.jrubyPrepare
102-
classpath project.configurations.jrubyWar
103-
}
104-
105-
project.task('jrubyJar', type: JRubyJar) {
106-
group JRubyPlugin.TASK_GROUP_NAME
107-
dependsOn project.tasks.jrubyPrepare
108-
dependsOn project.tasks.classes
109-
}
11067
}
11168

11269
}

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

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

src/test/groovy/com/github/jrubygradle/JRubyJarSpec.groovy

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

src/test/groovy/com/github/jrubygradle/JRubyPluginTest.groovy

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,6 @@ class JRubyPluginTest {
3434
assertTrue(project.tasks.jrubyPrepareGems instanceof JRubyPrepareGems)
3535
}
3636

37-
@Test
38-
public void jrubyPluginAddsJarTasks() {
39-
assertTrue(project.tasks.jrubyCacheJars instanceof AbstractCopyTask)
40-
}
41-
42-
@Test
43-
public void jrubyPluginAddsPrimaryTasks() {
44-
assertTrue(project.tasks.jrubyPrepare instanceof Task)
45-
assertTrue(project.tasks.jrubyWar instanceof War)
46-
assertTrue(project.tasks.jrubyJar instanceof Jar)
47-
assertTrue(project.tasks.jrubyClean instanceof Delete)
48-
}
49-
5037
@Test
5138
public void jrubyPluginSetsRepositoriesCorrectly() {
5239
project.evaluate()

src/test/groovy/com/github/jrubygradle/JRubyWarSpec.groovy

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

0 commit comments

Comments
 (0)