naether 0.4.2 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.2
1
+ 0.4.3
@@ -86,7 +86,15 @@ class Naether
86
86
  end
87
87
 
88
88
  def add_pom_dependencies( pom_path, scopes=['compile'] )
89
- @resolver.addDependencies( pom_path, scopes )
89
+ if Naether.platform == 'java'
90
+ @resolver.addDependencies( pom_path, scopes )
91
+ else
92
+ list = Rjb::import("java.util.ArrayList").new
93
+ scopes.each do |scope|
94
+ list.add( scope )
95
+ end
96
+ @resolver._invoke( 'addDependencies', 'Ljava.lang.String;Ljava.util.List;', pom_path, list )
97
+ end
90
98
  end
91
99
 
92
100
  # Add a dependency Java object
@@ -199,7 +207,17 @@ class Naether
199
207
  load_pom( file_path )
200
208
  end
201
209
 
202
- deps = Naether::Java.maven_project_dependencies_notation( @project_instance, scopes )
210
+ if Naether.platform == 'java'
211
+ deps = @project_instance.getDependenciesNotation( scopes, true )
212
+ else
213
+ if scopes
214
+ list = Rjb::import("java.util.ArrayList").new
215
+ scopes.each do |scope|
216
+ list.add( scope )
217
+ end
218
+ end
219
+ deps = @project_instance._invoke('getDependenciesNotation', 'Ljava.util.List;Z', list, true)
220
+ end
203
221
 
204
222
  Naether::Java.convert_to_ruby_array( deps, true )
205
223
  end
@@ -60,14 +60,6 @@ class Naether
60
60
  end
61
61
  end
62
62
 
63
- def self.maven_project_dependencies_notation( instance, scopes = nil )
64
- if Naether.platform == 'java'
65
- instance.getDependenciesNotation(scopes, true)
66
- else
67
- instance._invoke('getDependenciesNotation', 'Ljava.util.List;boolean;', scopes, true)
68
- end
69
- end
70
-
71
63
  def self.convert_to_ruby_array( java_array, to_string = false )
72
64
  if Naether.platform == 'java'
73
65
  return java_array.to_a
Binary file
data/pom.xml CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  <groupId>com.slackworks</groupId>
6
6
  <artifactId>naether</artifactId>
7
- <version>0.4.2</version>
7
+ <version>0.4.3</version>
8
8
  <packaging>jar</packaging>
9
9
  <name>naether</name>
10
10
  <url>https://github.com/mguymon/naether</url>
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: naether
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 9
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 2
10
- version: 0.4.2
9
+ - 3
10
+ version: 0.4.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Michael Guymon
@@ -99,6 +99,7 @@ files:
99
99
  - lib/naether.rb
100
100
  - lib/naether/bootstrap.rb
101
101
  - lib/naether/java.rb
102
+ - naether-0.4.3.jar
102
103
  - pom.xml
103
104
  has_rdoc: true
104
105
  homepage: http://github.com/mguymon/naether