motion-maven 1.1.1 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: abf882d168a964c5dc564d2819bdf1c3bf1f8133
4
- data.tar.gz: 64cdf88bc3d3e1a79c86eb4e6a9ed1bf2468f562
3
+ metadata.gz: 64cfbec7cc9b7dff003bdd3216a0ef89e6262805
4
+ data.tar.gz: 96b6287592769f3ac9a90df9350f5b1ec57af4d7
5
5
  SHA512:
6
- metadata.gz: 23786d574842462839957e2cc9129832ef02fd13a88756133d9d0043836eb22a8c29aa7f9fa46379092e152401032a01e918a989a99b46ea7b0f01f4d280f6d1
7
- data.tar.gz: 6422cd54d742a5621fa47183e65e7174ddada68ef81f36776fc3212c634cf843866e0efb9e70ebbdae9cf106641e131bc780e8ccbf88e37659c2d2aa002d724d
6
+ metadata.gz: 3e9310fb126203dfa725c294e10525d5525e3b3a6a327b0d33986b9709fbac21c1bf501d0e6b63c43e9f68866d6622827aada88bffcd704d240abe4f68941d63
7
+ data.tar.gz: b39339604bc6fb8bb78fdc57817efbe420e5258dcb1c4c9411346cfa3d2acbec81289d804a14dfefd3acec55158c940dae95d3b503fc337ec1104940357ff1ae
data/README.md CHANGED
@@ -37,22 +37,22 @@ gem 'motion-maven'
37
37
 
38
38
  2. Still in the `Rakefile`, set your dependencies
39
39
 
40
- ```ruby
41
- Motion::Project::App.setup do |app|
42
- # ...
43
- app.maven do
44
- dependency 'com.mcxiaoke.volley', :artifact => 'library', :version => '1.0.10'
45
- dependency 'commons-cli'
46
- dependency 'ehcache', :version => '1.2.3'
47
- end
48
- end
49
- ```
40
+ ```ruby
41
+ Motion::Project::App.setup do |app|
42
+ # ...
43
+ app.maven do
44
+ dependency 'com.mcxiaoke.volley', :artifact => 'library', :version => '1.0.10'
45
+ dependency 'commons-cli'
46
+ dependency 'ehcache', :version => '1.2.3'
47
+ end
48
+ end
49
+ ```
50
50
 
51
- * Other options are: :scope, :type
51
+ * Other options are: :scope, :type
52
52
 
53
- * :version will default to: LATEST
53
+ * :version will default to: LATEST
54
54
 
55
- * :artifact will default to dependency name
55
+ * :artifact will default to dependency name
56
56
 
57
57
 
58
58
  ## Configuration
@@ -70,14 +70,17 @@ You can also add other repositories :
70
70
 
71
71
  ```ruby
72
72
  Motion::Project::App.setup do |app|
73
- # ...
74
- app.maven do
75
- repository 'https://bintray.com/bintray/jcenter'
76
- dependency 'com.google.android', :artifact => 'support-v4'
77
- end
73
+ # ...
74
+ app.maven do
75
+ repository 'https://bintray.com/bintray/jcenter'
76
+ repository 'http://dl.bintray.com/austintaylor/maven'
77
+ dependency 'com.google.android', :artifact => 'support-v4'
78
+ end
78
79
  end
79
80
  ```
80
81
 
82
+ * Other options are: :snapshots (default:true), :releases (default:true)
83
+
81
84
  ## Tasks
82
85
 
83
86
  To tell motion-maven to download your dependencies, run the following rake
@@ -42,8 +42,8 @@ module Motion::Project
42
42
  @dependencies << normalized_dependency(name, options)
43
43
  end
44
44
 
45
- def repository(url)
46
- @repositories << url
45
+ def repository(url, options = {})
46
+ @repositories << normalized_repository(url, options)
47
47
  end
48
48
 
49
49
  def install!(update)
@@ -78,6 +78,14 @@ module Motion::Project
78
78
  end
79
79
  end
80
80
 
81
+ def normalized_repository(url, options)
82
+ {
83
+ url: url,
84
+ releases: options.fetch(:releases, true),
85
+ snapshots: options.fetch(:snapshots, true)
86
+ }
87
+ end
88
+
81
89
  def normalized_dependency(name, options)
82
90
  {
83
91
  name: name,
@@ -21,17 +21,16 @@
21
21
  </dependency>
22
22
  <% end %>
23
23
  </dependencies>
24
-
25
24
  <repositories>
26
25
  <% @repositories.each_with_index do |repository, index| %>
27
26
  <repository>
28
27
  <id>repository-<%= index %></id>
29
- <url><%= repository %></url>
28
+ <url><%= repository[:url] %></url>
30
29
  <releases>
31
- <enabled>true</enabled>
30
+ <enabled><%= repository[:releases] %></enabled>
32
31
  </releases>
33
32
  <snapshots>
34
- <enabled>false</enabled>
33
+ <enabled><%= repository[:snapshots] %></enabled>
35
34
  </snapshots>
36
35
  </repository>
37
36
  <% end %>
@@ -41,6 +40,7 @@
41
40
  <plugin>
42
41
  <groupId>org.apache.maven.plugins</groupId>
43
42
  <artifactId>maven-shade-plugin</artifactId>
43
+ <version>2.3</version>
44
44
  <executions>
45
45
  <execution>
46
46
  <phase>package</phase>
@@ -1,5 +1,5 @@
1
1
  module Motion::Project
2
2
  class Maven
3
- VERSION = '1.1.1'
3
+ VERSION = '1.2.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-maven
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joffrey Jaffeux