motion-gradle 1.2.1 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -3
- data/lib/motion-gradle.rb +1 -0
- data/lib/motion/project/gradle.rb +14 -2
- data/lib/motion/project/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16f9c7f8925294bb5446a31de105082f9d799808
|
4
|
+
data.tar.gz: cc88f7303a763464318e9be93755a5152de2051f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 145450ef3276d010b5d79ced75ae2cea1e08dc038a9d0699014f56c1d365f02eb394d4f3a94a9c7264e9a9aada1c64a4c1d37161b0c05d836f36fe383b95f949
|
7
|
+
data.tar.gz: 491bdec52b3ee2b5fa8ebb291caa2a399781dd45f39dc01957db1ec6ac072117d5d56d9bf68d6fa7d0f3e845cc79c5527bb13217416805978adc18e51324c051
|
data/README.md
CHANGED
@@ -78,11 +78,16 @@ end
|
|
78
78
|
|
79
79
|
## Support for local libraries
|
80
80
|
|
81
|
-
|
82
|
-
|
81
|
+
```ruby
|
82
|
+
Motion::Project::App.setup do |app|
|
83
|
+
# ...
|
84
|
+
app.gradle do
|
85
|
+
library 'mylib', path: '/Users/joffreyjaffeux/Projects/mylib'
|
86
|
+
end
|
83
87
|
end
|
88
|
+
```
|
84
89
|
|
85
|
-
If you don
|
90
|
+
If relative path is used it's relative to your Rakefile, if you don't specify a path it will search in your_app/my_lib.
|
86
91
|
|
87
92
|
|
88
93
|
## Tasks
|
data/lib/motion-gradle.rb
CHANGED
@@ -52,7 +52,15 @@ module Motion::Project
|
|
52
52
|
end
|
53
53
|
|
54
54
|
def library(library_name, options = {})
|
55
|
-
|
55
|
+
path = options.fetch(:path, library_name)
|
56
|
+
unless Pathname.new(path).absolute?
|
57
|
+
path = File.join('../..', path)
|
58
|
+
end
|
59
|
+
|
60
|
+
@libraries << {
|
61
|
+
name: library_name,
|
62
|
+
path: path
|
63
|
+
}
|
56
64
|
end
|
57
65
|
|
58
66
|
def repository(url)
|
@@ -138,7 +146,7 @@ module Motion::Project
|
|
138
146
|
def generate_gradle_settings_file
|
139
147
|
template_path = File.expand_path("../settings.erb", __FILE__)
|
140
148
|
template = ERB.new(File.new(template_path).read, nil, "%")
|
141
|
-
File.open(
|
149
|
+
File.open(gradle_settings_file, 'w') do |io|
|
142
150
|
io.puts(template.result(binding))
|
143
151
|
end
|
144
152
|
end
|
@@ -155,6 +163,10 @@ module Motion::Project
|
|
155
163
|
File.join(GRADLE_ROOT, 'build.gradle')
|
156
164
|
end
|
157
165
|
|
166
|
+
def gradle_settings_file
|
167
|
+
File.join(GRADLE_ROOT, 'settings.gradle')
|
168
|
+
end
|
169
|
+
|
158
170
|
def gradle_command
|
159
171
|
unless system("command -v #{@gradle_path} >/dev/null")
|
160
172
|
$stderr.puts("[!] #{@gradle_path} command doesn’t exist. Verify your gradle installation. Or set a different one with `app.gradle.path=(path)`")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: motion-gradle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joffrey Jaffeux
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-22 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: motion-gradle allows RubyMotion Android projects to have access to the
|
14
14
|
Gradle dependency manager.
|