2016-03-03 17:46:31 +01:00
apply plugin: 'com.android.application'
2017-08-04 05:42:43 +02:00
ext {
version_sdk = [
2017-08-05 14:00:55 +02:00
compileSdk : 24 ,
2017-08-04 05:42:43 +02:00
buildTools : "26.0.1" ,
2017-08-05 12:26:04 +02:00
minSdk : 17 ,
2017-08-04 05:42:43 +02:00
//targetSdk: compileSdk,
]
version_sdk . targetSdk = version_sdk . compileSdk
version_lib = [
2017-08-05 14:00:55 +02:00
appcompat : "24.2.1" ,
2017-08-04 05:42:43 +02:00
butterknife : "8.7.0" ,
2017-08-05 12:26:04 +02:00
netcipher : "2.0.0-alpha1" ,
2017-08-04 05:42:43 +02:00
]
}
2016-03-03 17:46:31 +01:00
android {
2017-08-04 05:42:43 +02:00
compileSdkVersion version_sdk . compileSdk
buildToolsVersion version_sdk . buildTools
2016-03-03 17:46:31 +01:00
defaultConfig {
2017-08-04 05:42:43 +02:00
minSdkVersion version_sdk . minSdk
targetSdkVersion version_sdk . targetSdk
2016-10-26 14:33:05 +02:00
2017-08-04 05:42:43 +02:00
versionCode 22
2017-08-05 12:26:04 +02:00
versionName "1.0.2"
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
}
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
2017-08-04 05:42:43 +02:00
compile "com.android.support:appcompat-v7:${version_lib.appcompat}"
2017-08-05 14:00:55 +02:00
//compile "com.android.support:design:${version_lib.appcompat}" // Broken after 24.1.0, Fix announced at 26.0.0, but still not fixed... See https://issuetracker.google.com/issues/37118105
compile "com.android.support:design:24.1.0"
2017-08-04 05:42:43 +02:00
compile "com.android.support:support-v4:${version_lib.appcompat}"
compile "com.android.support:customtabs:${version_lib.appcompat}"
compile "com.android.support:cardview-v7:${version_lib.appcompat}"
2016-05-05 17:42:29 +02:00
2017-08-05 12:26:04 +02:00
// UI libraries
compile "com.github.DASAR:ShiftColorPicker:v0.5"
// Tool libraries
2017-08-04 05:42:43 +02:00
compile "com.jakewharton:butterknife:${version_lib.butterknife}"
compile "info.guardianproject.netcipher:netcipher:${version_lib.netcipher}"
compile "info.guardianproject.netcipher:netcipher-webkit:${version_lib.netcipher}"
annotationProcessor "com.jakewharton:butterknife-compiler:${version_lib.butterknife}"
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 ( )