Giter Site home page Giter Site logo

sbt-robovm's Introduction

sbt-robovm

sbt-robovm is a plugin for the Scala build tool that aims to make it as simple as possible to compile Scala (and Java) code to binaries for iOS, linux, and OSX using RoboVM (version 1.0.0-alpha-04)

NOTE Due to a bug in LLVM, most samples will fail to build for the simulator unless run through ProGuard first. The sample projects show how to set that up, but your builds will take much longer. Testing on an actual device is recommended until the bug is fixed. See RoboVM issue #313 for updates.

Changelog

  • Changed the organization from com.hagerbot to org.roboscala

Setup

  1. Install Xcode 6.x
  2. Install JDK 7
  3. Install sbt
  4. Download and extract robovm-1.0.0-alpha-04.tar.gz to one of these places:
    • ~/Applications/robovm/
    • ~/.robovm/home/
    • /usr/local/lib/robovm/
    • /opt/robovm/
    • /usr/lib/robovm/
  5. See roboscala-samples for project creation and configuration

Usage

$ sbt ios/device
$ sbt ios/iphone-sim
$ sbt ios/ipad-sim
$ sbt ios/ipa
$ sbt ios/simulator

Simulators

The simulator task will run the program on device specified by the simulatorDevice setting key. For example: RobovmPlugin.simulatorDevice := Some("iPad-Air, 7.1")

To see all installed simulators, run $ sbt simulator-devices.

You can download simulators for more iOS versions in Xcode. (Xcode includes only the latest iOS simulator by default.)

Native

If you are using the plugin to build a native desktop project:

$ sbt project-name/native

Notes

The first time you try to compile a program, RoboVM must compile the Java and Scala standard libraries. This can take a few minutes, but the output of this process is cached. Subsequent compilations will be much faster.

If you are having issues after installing Xcode, open Xcode and agree to the license or open a Terminal and run xcrun.

Hacking on the plugin

If you need to make modifications to the plugin itself, you can compile and install it locally:

$ git clone git://github.com/roboscala/sbt-robovm.git
$ cd sbt-robovm
$ sbt publish-local

Projects using the plugin

libgdx-sbt-project.g8

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.