jberkel / android-plugin forked from harrah/android-plugin
- Source
- Commits
- Network (3)
- Issues (1)
- Downloads (1)
- Graphs
-
Branch:
master
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Mon Jul 06 19:58:28 -0700 2009 | |
| |
CHANGES | Tue Dec 08 02:59:12 -0800 2009 | |
| |
LICENSE | Sat Dec 05 03:52:54 -0800 2009 | |
| |
README.markdown | Tue Dec 08 02:59:12 -0800 2009 | |
| |
project/ | Wed Dec 16 05:06:11 -0800 2009 | |
| |
script/ | Tue Dec 08 02:59:12 -0800 2009 | |
| |
src/ | Wed Dec 16 05:06:11 -0800 2009 |
README.markdown
Usage
Requires sbt
To use the plugin in a project, you just need to create project/plugins/Plugins.scala:
import sbt._
class Plugins(info: ProjectInfo) extends PluginDefinition(info) {
val android = "org.scala-tools.sbt" % "android-plugin" % "0.3"
}
and make the project definition in project/build/Project (for example):
import sbt._
import java.io.File
class Project(info: ProjectInfo) extends AndroidProject(info) {
override def androidPlatformName = "android-1.5"
// or preferably set the ANDROID_SDK_HOME environment variable
override def androidSdkPath = Path.fromFile(new File("/home/mark/code/java/android-sdk-linux_x86-1.5_r2"))
}
Alternatively, you can also use a provided script to set everything up for you:
$ script/create_project MyAndroidProject com.foo.project
This will generate the project structure as well as all needed files plus skeleton tests, specs and activities.
To build the package:
$ cd MyAndroidProject
$ sbt update package-debug
To install the package:
$ sbt install-emulator
Hacking on the plugin
If you need make modifications to the plugin itself, you can compile and install it locally:
$ git clone git://github.com/jberkel/android-plugin.git
$ cd android-plugin
$ sbt publish-local
Credits
This code is based on work by Walter Chang (saisiyat), turned into a plugin by Mark Harrah.
