Current version is 1.1.10
- Multiple language support: Java, Scala, Kotlin
- No code changes to app required!
- appcompat-v7, design and support-v4 libraries
- Most existing android projects
- Android devices v4+
- Dex sharding for near-instant deployment
- Install sbt from http://scala-sbt.org, homebrew, ports, or your package manager of choice
- Install android-sdk-plugin:
echo 'addSbtPlugin("com.hanhuy.sbt" % "android-sdk-plugin" % "1.5.4")' > ~/.sbt/0.13/plugins/android.sbt
- Start from an existing or new project (for trivial projects):
sbt "gen-android ..."
to create a new project,sbt gen-android-sbt
to generate sbt files in an existing project. Non-trivial projects will need more advanced sbt configuration.- Alternatively, use
android-gradle-build
when working with an existing gradle project:echo 'addSbtPlugin("com.hanhuy.sbt" % "android-gradle-build" % "1.1.3")' > project/plugins.sbt
echo 'object Build extends android.GradleBuild' > project/build.scala
- Alternatively, use
- Add the protify plugin:
echo 'addSbtPlugin("com.hanhuy.sbt" % "android-protify" % "1.1.10")' >> project/plugins.sbt
- Add
protifySettings
:echo protifySettings >> build.sbt
- Run SBT
- Select device to run on by using the
devices
anddevice
commands. Run on all devices by executingset allDevices in Android := true
android:run
, and~protify
- Alternatively, high speed turnaround can be achieved with
protify:install
andprotify:run
to pretend the app is getting updated, rather than using the live-code mechanism.
- Alternatively, high speed turnaround can be achieved with
- Enjoy
LIMITATIONS:
- Deleting a constant value from
R
classes (removing resources) will require runningprotify:clean
or else the build will break - Singleton state will not be restored upon deploying new dex code. (or resources when on device api level <14)
- sync project in Android Studio
- Optionally add
idea-sbt-plugin
to run SBT inside of Android Studio protifySettings
goes into anyapp
projects'build.sbt
only.
- It works automatically if you're already using
android-sdk-plugin
and SBT
- Just do any of the above getting started steps and follow your own workflow.