Felix Ableitner
5f123afcab
The "thin" build type relies on system scala library, while "debug" and "release" provide the library itself.
82 lines
2.1 KiB
Groovy
82 lines
2.1 KiB
Groovy
apply plugin: 'com.android.application'
|
|
apply plugin: 'jp.leafytree.android-scala'
|
|
|
|
buildscript {
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
dependencies {
|
|
classpath "com.android.tools.build:gradle:0.14.4"
|
|
classpath "jp.leafytree.gradle:gradle-android-scala-plugin:1.3.1"
|
|
}
|
|
}
|
|
|
|
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;
|
|
}
|
|
}
|
|
|
|
|
|
android {
|
|
compileSdkVersion 21
|
|
buildToolsVersion "21.1.1"
|
|
|
|
defaultConfig {
|
|
applicationId "com.nutomic.ensichat"
|
|
minSdkVersion 15
|
|
targetSdkVersion 21
|
|
versionCode 1
|
|
versionName "0.1.0"
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
scala.srcDir "src/main/scala"
|
|
}
|
|
|
|
androidTest {
|
|
scala.srcDir "src/androidTest/scala"
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
thin {
|
|
minifyEnabled false
|
|
applicationIdSuffix ".debug"
|
|
signingConfig signingConfigs.debug
|
|
}
|
|
debug {
|
|
minifyEnabled false
|
|
applicationIdSuffix ".debug"
|
|
}
|
|
release {
|
|
minifyEnabled true
|
|
proguardFile file("proguard-rules.pro")
|
|
}
|
|
}
|
|
|
|
// 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'
|
|
exclude 'rootdoc.txt'
|
|
exclude 'META-INF/LICENSE'
|
|
exclude 'META-INF/NOTICE'
|
|
}
|
|
}
|