-
Notifications
You must be signed in to change notification settings - Fork 163
Inside Scaloid
This section provides basic knowledge for contributors.
- sbt 0.13.5 or later
- Android SDK Level 16
- Android Support Repository
- Environment variable ANDROID_HOME
A large part of the Scaloid source code is generated by a template engine.
One of the biggest reasons to use template based code generation is for the properties helper.
For example, Scaloid contains the following wrapper code for a property displayedChild
.
@inline def displayedChild = basis.getDisplayedChild
@inline def displayedChild (p: Int) = displayedChild_= (p)
@inline def displayedChild_=(p: Int) = { basis.setDisplayedChild (p); basis }
It is simply impossible to manually write and maintain these helpers for every property in the Android library,
so we generate them automatically with an sbt task.
Use sbt scaloid:generate
to generate the source code.
Then all of the files in src/main/st
folder are processed with the template engine and saved (overwritten) into the src/main/scala
folder.
- Scaloid can be built with Android API level 16 or higher and Scala version 2.11.0 or higher.
-
Create topic branches. Don't ask us to pull from your master branch.
-
One pull request per feature. If you want to do more than one thing, send multiple pull requests.
-
Document any change in behavior. Make sure the README and any other relevant documentation are kept up-to-date.
-
Send coherent history. Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please squash them before sending them to us.