2016-03-03 17:46:31 +01:00
|
|
|
apply plugin: 'com.android.application'
|
2016-06-02 13:58:09 +02:00
|
|
|
apply plugin: 'android-apt'
|
2016-03-03 17:46:31 +01:00
|
|
|
|
|
|
|
android {
|
2016-07-04 14:12:45 +02:00
|
|
|
compileSdkVersion 24
|
2016-10-14 00:22:08 +02:00
|
|
|
buildToolsVersion "24.0.3"
|
2016-03-03 17:46:31 +01:00
|
|
|
|
|
|
|
defaultConfig {
|
2016-08-06 22:53:20 +02:00
|
|
|
minSdkVersion 17
|
2016-07-04 14:12:45 +02:00
|
|
|
targetSdkVersion 24
|
2016-10-26 14:33:05 +02:00
|
|
|
|
2017-07-29 04:44:28 +02:00
|
|
|
versionCode 21
|
2017-07-30 12:36:47 +02:00
|
|
|
versionName "1.0.1"
|
2017-05-03 23:48:22 +02:00
|
|
|
|
|
|
|
applicationId "com.github.dfa.diaspora_android"
|
|
|
|
resValue 'string', 'app_name', "dandelion*"
|
|
|
|
manifestPlaceholders = [appIcon: "@drawable/ic_launcher"]
|
|
|
|
|
2017-03-19 23:32:18 +01:00
|
|
|
buildConfigField "boolean", "IS_TEST_BUILD", "false"
|
|
|
|
buildConfigField "boolean", "IS_GPLAY_BUILD", "false"
|
|
|
|
|
2016-11-04 03:08:59 +01:00
|
|
|
vectorDrawables.useSupportLibrary = true
|
2016-03-03 17:46:31 +01:00
|
|
|
}
|
|
|
|
buildTypes {
|
|
|
|
release {
|
|
|
|
minifyEnabled false
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
|
|
}
|
|
|
|
}
|
2016-07-27 21:54:54 +02:00
|
|
|
|
2016-12-22 04:07:30 +01:00
|
|
|
productFlavors {
|
2017-03-19 23:32:18 +01:00
|
|
|
flavorDefault {
|
2016-12-22 04:07:30 +01:00
|
|
|
}
|
|
|
|
|
2017-05-03 23:48:22 +02:00
|
|
|
/*
|
|
|
|
flavorGplay {
|
|
|
|
buildConfigField "boolean", "IS_GPLAY_BUILD", "true"
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
|
2017-03-19 23:32:18 +01:00
|
|
|
flavorTest {
|
2017-05-03 23:48:22 +02:00
|
|
|
applicationId "com.github.dfa.secondlion"
|
2017-03-19 23:32:18 +01:00
|
|
|
resValue 'string', 'app_name', "secondlion*"
|
2017-05-03 23:48:22 +02:00
|
|
|
manifestPlaceholders = [appIcon: "@drawable/ic_launcher_test"]
|
2017-02-24 22:46:17 +01:00
|
|
|
versionCode = Integer.parseInt(new Date().format('yyMMdd'))
|
|
|
|
versionName = new Date().format('yyMMdd')
|
2017-03-19 23:32:18 +01:00
|
|
|
buildConfigField "boolean", "IS_TEST_BUILD", "true"
|
2016-12-22 04:07:30 +01:00
|
|
|
}
|
2017-03-19 23:32:18 +01:00
|
|
|
}
|
2016-07-27 21:54:54 +02:00
|
|
|
lintOptions {
|
|
|
|
disable 'MissingTranslation'
|
|
|
|
}
|
2016-03-03 17:46:31 +01:00
|
|
|
}
|
|
|
|
|
2016-11-04 03:08:59 +01:00
|
|
|
// Additional repositories
|
2016-10-13 16:56:31 +02:00
|
|
|
repositories {
|
|
|
|
maven {
|
2016-11-06 05:32:43 +01:00
|
|
|
url "https://jitpack.io"
|
2016-10-13 16:56:31 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-03-03 17:46:31 +01:00
|
|
|
dependencies {
|
2016-05-05 17:42:29 +02:00
|
|
|
// Sub-Projects
|
|
|
|
//compile project(':subprojectFromRoot')
|
|
|
|
|
|
|
|
// Jars
|
2016-03-03 17:46:31 +01:00
|
|
|
compile fileTree(dir: 'libs', include: ['*.jar'])
|
|
|
|
testCompile 'junit:junit:4.12'
|
2016-05-05 17:42:29 +02:00
|
|
|
|
|
|
|
// Android standard libs
|
2016-10-10 18:13:41 +02:00
|
|
|
compile 'com.android.support:appcompat-v7:24.2.1'
|
2016-11-04 03:08:59 +01:00
|
|
|
compile 'com.android.support:design:24.1.0' //Don't update. Broken up to 25.0.0
|
2016-10-10 18:13:41 +02:00
|
|
|
compile 'com.android.support:support-v4:24.2.1'
|
2016-11-04 03:08:59 +01:00
|
|
|
compile 'com.android.support:customtabs:24.2.1'
|
2016-11-08 13:07:38 +01:00
|
|
|
compile 'com.android.support:cardview-v7:24.2.1'
|
2016-05-05 17:42:29 +02:00
|
|
|
|
|
|
|
// More libraries
|
2016-06-02 13:58:09 +02:00
|
|
|
compile 'com.jakewharton:butterknife:8.0.1'
|
2016-08-23 14:36:03 +02:00
|
|
|
compile 'info.guardianproject.netcipher:netcipher:2.0.0-alpha1'
|
|
|
|
compile 'info.guardianproject.netcipher:netcipher-webkit:2.0.0-alpha1'
|
2016-11-06 05:32:43 +01:00
|
|
|
compile 'com.github.DASAR:ShiftColorPicker:v0.5'
|
2016-06-02 13:58:09 +02:00
|
|
|
apt 'com.jakewharton:butterknife-compiler:8.0.1'
|
2016-08-27 15:17:02 +02:00
|
|
|
}
|
|
|
|
|
2016-11-04 03:08:59 +01:00
|
|
|
// #####################
|
|
|
|
// Groovy Coding Area
|
|
|
|
// #####################
|
|
|
|
final String RAW_DIR = "app/src/main/res/raw"
|
2017-07-29 04:44:28 +02:00
|
|
|
final String[] ROOT_TO_RAW_COPYFILES = ["README.md", "LICENSE.md", "CHANGELOG.md", "CONTRIBUTORS.md"]
|
2016-06-02 13:58:09 +02:00
|
|
|
|
2016-11-04 03:08:59 +01:00
|
|
|
// Called before building
|
2016-08-27 15:17:02 +02:00
|
|
|
task copyRepoFiles(type: Copy) {
|
2016-11-04 03:08:59 +01:00
|
|
|
|
|
|
|
// Copy files over to raw dir
|
|
|
|
from rootProject.files(ROOT_TO_RAW_COPYFILES)
|
|
|
|
into RAW_DIR.replaceFirst("app/", "")
|
2016-08-27 15:17:02 +02:00
|
|
|
rename { String fileName ->
|
|
|
|
fileName.replace(fileName, fileName.toLowerCase())
|
|
|
|
}
|
2016-03-03 17:46:31 +01:00
|
|
|
}
|
2016-11-04 03:08:59 +01:00
|
|
|
tasks.copyRepoFiles.execute()
|