-
Notifications
You must be signed in to change notification settings - Fork 113
Getting started
Using a giter8 template is the easiest way to create a new project that uses the plugin. If you don't have giter8 installed:
$ curl https://raw.github.com/n8han/conscript/master/setup.sh | sh
$ ~/bin/cs n8han/giter8
Now create a new project with one of the Android templates:
$ ~/bin/g8 jberkel/android-app # sbt 0.11.x
This will prompt you to customize a few values (press enter to accept defaults), then create the project structure and all needed files plus skeleton tests, specs and activities.
Since this plugin is currently not released you'll have to first build and install it locally by performing the following as described in the "Hacking on the plugin" section.
$ git clone git://github.com/jberkel/android-plugin.git
$ cd android-plugin
$ sbt publish-local
Then, to build the Android package:
$ cd <your app name>
$ export ANDROID_HOME=/path/to/sdk # or ANDROID_SDK_{HOME,ROOT}
$ sbt # enter sbt's interactive mode
> android:package-debug
To install and start the main activity in the Android Emulator (must already be running):
> android:start-emulator
To build a signed package for release into the Marketplace:
> android:prepare-market
##Launching the emulator from sbt
A developer can now fire up the Android Emulator from the sbt terminal (hint: you can get a list of all avds with tab completion)
> android:emulator-start <my_avd>
To list all devices or emulators
> android:list-devices
To stop the emulator:
> android:emulator-stop
- Getting started
- Scala versions
- Android Manifest generation
- Typed resources references
- ProGuard
- DDMS integration
- Building Java Android projects
- Building NDK projects
- Consuming Android Library projects
- Github integration
- Building Android Test Projects
- Password Manager
- Releasing to the Android Market
- Projects using sbt-android-plugin
- Contributors