Android, Scala, SBT and (*&^% org.scalatest#scalatest_2.8.1;1.6.1: not found
Published by emacstheviking on Tue, 09/27/2011 - 21:26
After much MUCH swearing and cursing and after finding this page on the net:
http://www.scalatest.org/download
I finally managed to get my scala sbt android project to bloody work using 2.8.1 as the base, having built an emulator ramdisk with the predexed jars already on it.
How? I changed the 1.6.1 to 1.5.1, which seems to fit the text of the above page i.e. 1.6.1 is for scala 2.9.1 and 1.5.1 is for 2.8.1+
In fact, here is my complete build.scala file from the project directory.
import sbt._
import Keys._
import AndroidKeys._
object General {
val settings = Defaults.defaultSettings ++ Seq (
name := "My Android Project",
version := "0.1",
scalaVersion := "2.8.1",
platformName in Android := "android-7"
)
lazy val fullAndroidSettings =
General.settings ++
AndroidProject.androidSettings ++
TypedResources.settings ++
AndroidMarketPublish.settings ++ Seq (
keyalias in Android := "change-me",
libraryDependencies += "org.scalatest" %% "scalatest" % "1.5.1" % "test"
)
}
object AndroidBuild extends Build {
lazy val main = Project (
"My Android Project",
file("."),
settings = General.fullAndroidSettings
)
lazy val tests = Project (
"tests",
file("tests"),
settings = General.settings ++ AndroidTest.androidSettings
) dependsOn main
}
Hope it saves some pain.
Add new comment