diff --git a/README.md b/README.md
index 366ae5a..77e3899 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,10 @@
Building
========
-To build, run `./gradlew assembleDebug` or `./gradlew assembleRelease`.
+To create a debug apk, run `./gradlew assembleDebug`. Alternatively, you can use
+`.gradlew thinDebug` for a faster compile, but this requires Scala libraries installed
+with [Android-Scala-Installer](https://github.com/Arneball/Android-Scala-Installer) on your device.
+
+To create a release apk, run `./gradlew assembleRelease`.
License
=======
diff --git a/app/build.gradle b/app/build.gradle
index ccb1a62..7348f7f 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -1,3 +1,6 @@
+apply plugin: 'com.android.application'
+apply plugin: 'jp.leafytree.android-scala'
+
buildscript {
repositories {
mavenCentral()
@@ -7,11 +10,21 @@ buildscript {
classpath "jp.leafytree.gradle:gradle-android-scala-plugin:1.3.1"
}
}
-repositories {
- jcenter()
+
+dependencies {
+ compile "com.android.support:support-v4:21.0.0"
+ // For `flat` debug config, as `flatProvided` is unknown.
+ provided "org.scala-lang:scala-library:2.11.4"
+ debugCompile "org.scala-lang:scala-library:2.11.4"
+ releaseCompile "org.scala-lang:scala-library:2.11.4"
+ compile("org.msgpack:msgpack-scala_2.11:0.6.11") {
+ transitive = false;
+ }
+ compile('org.msgpack:msgpack:0.6.11'){
+ transitive = false;
+ }
}
-apply plugin: 'com.android.application'
-apply plugin: 'jp.leafytree.android-scala'
+
android {
compileSdkVersion 21
@@ -27,22 +40,22 @@ android {
sourceSets {
main {
- scala {
- srcDir "src/main/scala"
- }
+ scala.srcDir "src/main/scala"
}
androidTest {
- scala {
- srcDir "src/androidTest/scala"
- }
+ scala.srcDir "src/androidTest/scala"
}
}
buildTypes {
+ thin {
+ minifyEnabled false
+ applicationIdSuffix ".debug"
+ signingConfig signingConfigs.debug
+ }
debug {
-// minifyEnabled true
- proguardFile file("proguard-rules.pro")
+ minifyEnabled false
applicationIdSuffix ".debug"
}
release {
@@ -51,6 +64,14 @@ android {
}
}
+ // Needed to rename `app-thin.apk` to `app-debug.apk` (because Android Studio doesn't let us
+ // specify a different apk name).
+ applicationVariants.all { variant ->
+ def apk = variant.outputFile;
+ def newName = apk.name.replace("app-thin", "app-debug");
+ variant.outputFile = new File(apk.parentFile, newName);
+ }
+
// Avoid duplicate file errors during packaging.
packagingOptions {
exclude 'decoder.properties'
@@ -59,16 +80,3 @@ android {
exclude 'META-INF/NOTICE'
}
}
-
-dependencies {
- compile "com.android.support:support-v4:21.+"
- provided "org.scala-lang:scala-library:2.11.4"
- compile("org.msgpack:msgpack-scala_2.11:0.6.11") {
- transitive = false;
- }
- compile('org.msgpack:msgpack:0.6.11'){
- transitive = false;
- }
-}
-
-
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 3049328..c7783cd 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -8,15 +8,13 @@
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+