This is giter8 template for Android project with Scala 2.10, folked from jberkel/android-app.g8 .
Due to #SI-7253, I strongly recommend you to use Scala2.10.2 or above.
Please refer to my blog article for more detail (only in Japanese, though).
To use this template, g8 needs to be installed first. Read g8's readme.
All done? Now fire up your favorite shell and enter
g8 taisukeoe/android-app
cd <name-of-app>
sbt android:package-debug
Your android sbt project contains 2 subprojects:
- MainProject
- generated AndroidManifest.xml
- Activity.scala (the "hello world" activity)
- TestProject (tests)
- Integration tests, see Android Testing
$ sbt
$ android:emulator-start <tab>
$ android:install-emulator
$ sbt
> test
[info] Specs:
[info] a spec
[info] - should do something
[info] Passed: : Total 1, Failed 0, Errors 0, Passed 1, Skipped 0
The main apk under test needs to be installed first. Then:
$ sbt
> project tests
> android:install-emulator
> android:test-emulator
[info]
[info] my.android.project.tests.ActivityTests:.
[info] my.android.project.tests.AndroidTests:..
[info] Test results for InstrumentationTestRunner=...
[info] Time: 1.492
[info]
[info] OK (3 tests)