Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use motion-gradle for dependency management #80

Merged
merged 1 commit into from
Dec 28, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ before_install:
- sudo mkdir -p ~/Library/RubyMotion/build
- sudo chown -R travis ~/Library/RubyMotion/build
script:
- bundle install
- rake build:ios
- cd test && bundle install
- cd test && bundle install --gemfile=./Gemfile
- ruby server.rb &
- bundle exec rake ios:clean:all
- bundle exec rake ios:spec
- rake ios:clean:all
- rake ios:spec
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source 'https://rubygems.org'
gem 'rake'
gem 'motion-gradle'
15 changes: 15 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
GEM
remote: https://rubygems.org/
specs:
motion-gradle (2.1.0)
rake (12.3.0)

PLATFORMS
ruby

DEPENDENCIES
motion-gradle
rake

BUNDLED WITH
1.16.0
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ Flow is currently composed of the following libraries:
$ gem install motion-flow
```

If you are targeting Android, you need to install the dependencies with Gradle:

```
$ bundle && rake android:gradle:install
```

### Projects

#### Flow projects
Expand Down
13 changes: 8 additions & 5 deletions lib/android.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

$:.unshift("/Library/RubyMotion/lib")
require 'motion/project/template/android'
require 'motion-gradle'

Motion::Project::App.setup do |app|
app.api_version = '23' unless Motion::Project::Config.starter?
Expand Down Expand Up @@ -34,12 +35,14 @@
application['android:theme'] = '@style/Theme.AppCompat.Light'
end

vendor_dir = File.join(File.dirname(__FILE__), '../vendor/android')
v7_app_compat_dir = File.join(vendor_dir, 'support/v7/appcompat')
app.vendor_project(:jar => File.join(v7_app_compat_dir, "/libs/android-support-v4.jar"))
app.vendor_project(:jar => File.join(v7_app_compat_dir, "/libs/android-support-v7-appcompat.jar"), :resources => File.join(v7_app_compat_dir, "/res"), :manifest => File.join(v7_app_compat_dir, "/AndroidManifest.xml"))
app.gradle do
repository 'https://maven.google.com'
dependency 'com.android.support:appcompat-v7:24.2.1'
dependency 'com.android.support:support-v4:24.2.1'
dependency 'com.google.android.gms:play-services-vision:11.8.0'
dependency 'com.google.android.gms:play-services-vision-common:11.8.0'
end

app.vendor_project(:jar => File.join(vendor_dir, 'google-play-services_lib/libs/google-play-services.jar'), :filter => ['^.com.google.android.gms.vision'], :resources => File.join(vendor_dir, 'google-play-services_lib/res'), :manifest => File.join(vendor_dir, 'google-play-services_lib/AndroidManifest.xml'))
app.manifest_entry('application', 'meta-data', :name => 'com.google.android.gms.version', :value => '@integer/google_play_services_version')
app.manifest_entry('application', 'meta-data', :name => 'com.google.android.gms.vision.DEPENDENCIES', :value => 'barcode')
end
4 changes: 4 additions & 0 deletions lib/motion-flow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@ def invoke_rake(platform, task)
task "spec:emulator" do
invoke_rake 'android', 'spec:emulator'
end
desc "Download and build dependencies"
task "gradle:install" do
invoke_rake 'android', 'gradle:install'
end
end
namespace 'osx' do
desc "Build the project for development"
Expand Down
5 changes: 5 additions & 0 deletions samples/reddit/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
source 'https://rubygems.org'

gem 'rake'
gem 'motion-flow', path: '../../'
# Add your dependencies here:
21 changes: 21 additions & 0 deletions samples/reddit/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
PATH
remote: ../..
specs:
motion-flow (0.1.9)
motion-gradle

GEM
remote: https://rubygems.org/
specs:
motion-gradle (2.1.0)
rake (12.3.0)

PLATFORMS
ruby

DEPENDENCIES
motion-flow!
rake

BUNDLED WITH
1.16.0
1 change: 1 addition & 0 deletions samples/ui_demo/Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
source 'https://rubygems.org'

gem 'rake'
gem 'motion-flow', path: '../../'
# Add your dependencies here:
8 changes: 5 additions & 3 deletions samples/ui_demo/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
PATH
remote: ..
remote: ../..
specs:
motion-flow (0.2)
motion-flow (0.1.9)
motion-gradle

GEM
remote: https://rubygems.org/
specs:
motion-gradle (2.1.0)
rake (10.5.0)

PLATFORMS
Expand All @@ -16,4 +18,4 @@ DEPENDENCIES
rake

BUNDLED WITH
1.11.2
1.16.0
31 changes: 31 additions & 0 deletions test/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
GEM
remote: https://rubygems.org/
specs:
daemons (1.2.5)
eventmachine (1.2.5)
mustermann (1.0.1)
rack (2.0.3)
rack-protection (2.0.0)
rack
rake (12.3.0)
sinatra (2.0.0)
mustermann (~> 1.0)
rack (~> 2.0)
rack-protection (= 2.0.0)
tilt (~> 2.0)
thin (1.7.2)
daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0, >= 1.0.4)
rack (>= 1, < 3)
tilt (2.0.8)

PLATFORMS
ruby

DEPENDENCIES
rake
sinatra
thin

BUNDLED WITH
1.16.0
8 changes: 0 additions & 8 deletions vendor/android/google-play-services_lib/.classpath

This file was deleted.

26 changes: 0 additions & 26 deletions vendor/android/google-play-services_lib/AndroidManifest.xml

This file was deleted.

17 changes: 0 additions & 17 deletions vendor/android/google-play-services_lib/README.txt

This file was deleted.

Binary file not shown.

This file was deleted.

35 changes: 0 additions & 35 deletions vendor/android/google-play-services_lib/proguard.txt

This file was deleted.

15 changes: 0 additions & 15 deletions vendor/android/google-play-services_lib/project.properties

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.

This file was deleted.

This file was deleted.

Loading