Skip to content
Sung-Ho Lee edited this page Jul 25, 2013 · 45 revisions

Quick start

Starting a new project

For maven:

Fork Hello world of Scaloid project.

For sbt:

Fork Scaloid examples for sbt

Adopting Scaloid for your existing project

Before start using Scaloid, check your project is properly configured with Scala language.

  1. Import Scaloid to your project
  2. Declare import org.scaloid.common._ in your code.
  3. Modify the signature of your classes
  • If your class inherits Activity, change it to SActivity
  • If your class inherits Service, change it to SService
  • If your class (indirectly) inherits Context, add trait SContext with LoggerTag
  • Otherwise, setting an implicit value is required
    implicit val ctx: Context = ...

Then, you are ready to use Scaloid.

If you want to see how Scaloid can be used in action, check a Scala port of apidemos app.

Import Scaloid to your project

Scaloid is released to the central maven repository.

For maven:

<dependency>
    <groupId>org.scaloid</groupId>
    <artifactId>scaloid_2.10</artifactId>
    <version>2.2-8</version>
</dependency>

For sbt:

libraryDependencies += "org.scaloid" %% "scaloid" % "2.2-8"
Version number

Version number of Scaloid is consisted of two parts, separated by a - character. The first part is the version of Scaloid, the second is the level of Android API.

Please note that Android API provides backward compatibility. Therefore you can use a Scaloid artifact targeted to API level 8 for the Android application using the level 8 or above. In other side, Scala does not provide binary compatibility. The Scaloid artifact uploaded to the central repo is compiled with Scala 2.10. If you use other Scala versions, build the artifact as shown in the following subsection.


* See also: Building Scaloid