GithubHelp home page GithubHelp logo

luiseduardohdbackup / motion-gradle Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hipbyte/motion-gradle

0.0 3.0 0.0 207 KB

Integrate 3rd-party Java dependencies in RubyMotion for Android projects using Gradle

License: MIT License

Ruby 80.43% HTML 19.57%

motion-gradle's Introduction

motion-gradle

motion-gradle allows RubyMotion projects to integrate with Gradle to manage your dependencies.

Installation

You need to have gradle installed:

$ brew install gradle

And the gem installed:

$ [sudo] gem install motion-gradle

Or if you use Bundler:

gem 'motion-gradle'

You also need to install Extras/Android Support Repository and Extras/Google Repository with the Android SDK Manager gui.

android-sdk-manager

Setup

Edit the Rakefile of your RubyMotion project and add the following require lines:

require 'rubygems'
require 'motion-gradle'

Dependencies

From version 1.1.0 you can use the same gradle dependency string that Java users use.

Motion::Project::App.setup do |app|
  # ...
  app.gradle do
    dependency 'net.sf.ehcache:ehcache:2.9.0'
    dependency 'com.joanzapata.pdfview:android-pdfview:1.0.+@aar'
    dependency 'com.danikula:videocache:2.3.1' do
      exclude module: 'android', group: 'com.google.android'
    end
  end
end

Configuration

If the gradle command is not found in your PATH, you can configure it:

Motion::Project::App.setup do |app|
  # ...
  app.gradle.path = '/some/path/gradle'
end

Repositories :

Motion::Project::App.setup do |app|
  # ...
  app.gradle do
    repository 'https://bintray.com/bintray/jcenter'
    repository 'http://dl.bintray.com/austintaylor/gradle'
  end
end

Java libraries

Motion::Project::App.setup do |app|
  # ...
  app.gradle do
    library 'mylib', path: '/Users/joffreyjaffeux/Projects/mylib'
   end
end

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.

Plugins

Motion::Project::App.setup do |app|
  # ...
  app.gradle do
    plugin 'com.google.gms.google-services'
   end
end

Classpaths

Motion::Project::App.setup do |app|
  # ...
  app.gradle do
    classpath 'com.google.gms:google-services:1.3.0-beta1'
  end
end

Aidl

Motion::Project::App.setup do |app|
  # ...
  app.gradle do
    aidl 'com.android.vending.billing', './vendor/IInAppBillingService.aidl'
  end
end

Tasks

To tell motion-gradle to download your dependencies, run the following rake task:

$ [bundle exec] rake gradle:install

After a rake clean:all you will need to run the install task agin.

That’s all.

Known issues

motion-gradle's People

Contributors

acrogenesis avatar darinwilson avatar gantman avatar jjaffeux avatar skellock avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.