naether 0.4.2-java → 0.4.3-java

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.2
1
+ 0.4.3
data/lib/naether.rb CHANGED
@@ -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
data/lib/naether/java.rb CHANGED
@@ -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
data/naether-0.4.3.jar ADDED
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
@@ -2,7 +2,7 @@
2
2
  name: naether
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.4.2
5
+ version: 0.4.3
6
6
  platform: java
7
7
  authors:
8
8
  - Michael Guymon
@@ -74,6 +74,7 @@ files:
74
74
  - lib/naether.rb
75
75
  - lib/naether/bootstrap.rb
76
76
  - lib/naether/java.rb
77
+ - naether-0.4.3.jar
77
78
  - pom.xml
78
79
  has_rdoc: true
79
80
  homepage: http://github.com/mguymon/naether