Create "thin" build type and clean up previous commit.
The "thin" build type relies on system scala library, while "debug" and "release" provide the library itself.
This commit is contained in:
parent
873b7fd0bd
commit
5f123afcab
4 changed files with 52 additions and 29 deletions
|
@ -1,6 +1,10 @@
|
||||||
Building
|
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
|
License
|
||||||
=======
|
=======
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
apply plugin: 'com.android.application'
|
||||||
|
apply plugin: 'jp.leafytree.android-scala'
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
@ -7,11 +10,21 @@ buildscript {
|
||||||
classpath "jp.leafytree.gradle:gradle-android-scala-plugin:1.3.1"
|
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;
|
||||||
}
|
}
|
||||||
apply plugin: 'com.android.application'
|
compile('org.msgpack:msgpack:0.6.11'){
|
||||||
apply plugin: 'jp.leafytree.android-scala'
|
transitive = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 21
|
compileSdkVersion 21
|
||||||
|
@ -27,22 +40,22 @@ android {
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main {
|
main {
|
||||||
scala {
|
scala.srcDir "src/main/scala"
|
||||||
srcDir "src/main/scala"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
androidTest {
|
androidTest {
|
||||||
scala {
|
scala.srcDir "src/androidTest/scala"
|
||||||
srcDir "src/androidTest/scala"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
thin {
|
||||||
|
minifyEnabled false
|
||||||
|
applicationIdSuffix ".debug"
|
||||||
|
signingConfig signingConfigs.debug
|
||||||
|
}
|
||||||
debug {
|
debug {
|
||||||
// minifyEnabled true
|
minifyEnabled false
|
||||||
proguardFile file("proguard-rules.pro")
|
|
||||||
applicationIdSuffix ".debug"
|
applicationIdSuffix ".debug"
|
||||||
}
|
}
|
||||||
release {
|
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.
|
// Avoid duplicate file errors during packaging.
|
||||||
packagingOptions {
|
packagingOptions {
|
||||||
exclude 'decoder.properties'
|
exclude 'decoder.properties'
|
||||||
|
@ -59,16 +80,3 @@ android {
|
||||||
exclude 'META-INF/NOTICE'
|
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,15 +8,13 @@
|
||||||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
||||||
|
|
||||||
<uses-feature android:name="android.hardware.bluetooth" android:required="true" />
|
<uses-feature android:name="android.hardware.bluetooth" android:required="true" />
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:icon="@drawable/ic_launcher"
|
android:icon="@drawable/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:theme="@style/AppTheme" >
|
android:theme="@style/AppTheme" >
|
||||||
|
|
||||||
<uses-library android:name="s1"/>
|
|
||||||
<uses-library android:name="s2"/>
|
|
||||||
<uses-library android:name="s3"/>
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".activities.MainActivity"
|
android:name=".activities.MainActivity"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
|
|
13
app/src/thin/AndroidManifest.xml
Normal file
13
app/src/thin/AndroidManifest.xml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
package="com.nutomic.ensichat">
|
||||||
|
|
||||||
|
<application>
|
||||||
|
|
||||||
|
<uses-library android:name="s1" />
|
||||||
|
<uses-library android:name="s2" />
|
||||||
|
<uses-library android:name="s3" />
|
||||||
|
|
||||||
|
</application>
|
||||||
|
|
||||||
|
</manifest>
|
Reference in a new issue