77 lines
2 KiB
Groovy
77 lines
2 KiB
Groovy
apply plugin: 'com.android.application'
|
|
apply plugin: 'jp.leafytree.android-scala'
|
|
|
|
buildscript {
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
dependencies {
|
|
classpath "jp.leafytree.gradle:gradle-android-scala-plugin:1.3.2"
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
compile "com.android.support:support-v4:21.0.3"
|
|
// For `flat` debug config, as `flatProvided` is unknown.
|
|
provided "org.scala-lang:scala-library:2.11.5"
|
|
debugCompile "org.scala-lang:scala-library:2.11.5"
|
|
releaseCompile "org.scala-lang:scala-library:2.11.5"
|
|
compile 'com.google.guava:guava:18.0'
|
|
}
|
|
|
|
android {
|
|
compileSdkVersion 21
|
|
buildToolsVersion "21.1.2"
|
|
|
|
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 {
|
|
applicationIdSuffix ".debug"
|
|
minifyEnabled false
|
|
signingConfig signingConfigs.debug
|
|
}
|
|
debug {
|
|
applicationIdSuffix ".debug"
|
|
minifyEnabled true
|
|
proguardFile file("proguard-rules.pro")
|
|
}
|
|
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'
|
|
}
|
|
}
|
|
|
|
tasks.withType(ScalaCompile) {
|
|
scalaCompileOptions.useCompileDaemon = true
|
|
}
|