Skip to content

Commit

Permalink
Update build system and dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
ndarilek committed Aug 29, 2014
1 parent 00e6d83 commit df0851f
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 21 deletions.
25 changes: 12 additions & 13 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,28 +1,24 @@
import sbtandroid._

androidDefaults
import android.Keys._

name := "Spiel"

version := "3.0.0-SNAPSHOT"

versionCode := 13
versionCode := Some(13)

scalaVersion := "2.10.2"
scalaVersion := "2.11.2"

scalacOptions ++= Seq("-deprecation", "-feature", "-language:existentials,implicitConversions,postfixOps", "-target:jvm-1.6")

javacOptions ++= Seq("-source", "1.6", "-target", "1.6")

platformName := "android-19"

keystorePath in Release := file(".") / "spiel.keystore"
//keystorePath in Release := file(".") / "spiel.keystore"

keyalias := "spiel"
//keyalias := "spiel"

PasswordManager.settings
//PasswordManager.settings

cachePasswords := true
//cachePasswords := true

resolvers ++= Seq(
"Sonatype Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/"
Expand All @@ -31,12 +27,15 @@ resolvers ++= Seq(
libraryDependencies := Seq(
"rhino" % "js" % "1.7R2" from "https://github.com/damonkohler/sl4a/raw/master/rhino/rhino1_7R2.jar",
//"net.databinder.dispatch" %% "dispatch-json4s-native" % "0.10.0",
"org.scaloid" %% "scaloid" % "2.3-8",
"org.scaloid" %% "scaloid" % "3.4-10",
"org.macroid" %% "macroid" % "2.0.0-M3",
"com.android.support" % "support-v4" % "20.0.0",
"org.ccil.cowan.tagsoup" % "tagsoup" % "1.2.1",
"ch.acra" % "acra" % "4.5.0"
)

proguardOptions += """
proguardOptions in Android += """
-ignorewarnings
-keep class scala.collection.SeqLike { public protected *; }
-keep class info.spielproject.spiel.** { *; }
-keep class org.mozilla.javascript.* { *; }
Expand Down
Empty file modified lint.sh
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version = 0.12.4
sbt.version = 0.13.5
1 change: 1 addition & 0 deletions project/build.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
object Build extends android.AutoBuild
4 changes: 1 addition & 3 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
resolvers += Resolver.url("scalasbt releases", new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases"))(Resolver.ivyStylePatterns)

addSbtPlugin("org.scala-sbt" % "sbt-android" % "0.7")
addSbtPlugin("com.hanhuy.sbt" % "android-sdk-plugin" % "1.3.4")
2 changes: 1 addition & 1 deletion src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
android:versionName="3.0.0-SNAPSHOT"
android:versionCode = "13">

<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="18"/>
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="19"/>
<uses-feature android:name="android.hardware.bluetooth" android:required="false"/>
<uses-feature android:name="android.hardware.telephony" android:required="false"/>
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/Sensors.scala
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ object Sensors extends SensorEventListener {
// This may need tweaking, but this seems like a good value for an intentional shake.
private val shakerThreshold = 1.2

def onSensorChanged(e:SensorEvent) = e.sensor match {
def onSensorChanged(e:SensorEvent) = Option(e.sensor) match {
case Accelerometer =>
val netForce = math.sqrt(math.pow(e.values(0)/SensorManager.GRAVITY_EARTH, 2)
+math.pow(e.values(1)/SensorManager.GRAVITY_EARTH, 2)
Expand Down
4 changes: 2 additions & 2 deletions src/main/scala/ui.scala
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,12 @@ class Scripts extends ListFragment with Refreshable {
startActivity(intent)
case R.id.delete =>
new AlertDialogBuilder("", getString(R.string.confirmDelete, script.pkg))(getActivity) {
positiveButton(android.R.string.yes, {
positiveButton(getString(android.R.string.yes), {
script.delete()
script.uninstall()
refresh()
})
negativeButton(android.R.string.no)
negativeButton(getString(android.R.string.no))
}.show()
}
true
Expand Down

0 comments on commit df0851f

Please sign in to comment.