1
0
Fork 0
mirror of https://github.com/gsantner/dandelion synced 2024-11-05 03:56:01 +01:00
dandelion/app/build.gradle

112 lines
3.4 KiB
Groovy
Raw Normal View History

2016-03-03 17:46:31 +01:00
apply plugin: 'com.android.application'
2017-08-04 05:42:43 +02:00
ext {
version_sdk = [
compileSdk : 24,
2017-08-04 05:42:43 +02:00
buildTools : "26.0.1",
minSdk : 17,
2017-08-04 05:42:43 +02:00
//targetSdk: compileSdk,
]
version_sdk.targetSdk = version_sdk.compileSdk
version_lib = [
appcompat : "24.1.0", // Broken after 24.1.0, Fix announced at 26.0.0, but still not fixed... See https://issuetracker.google.com/issues/37118105
butterknife : "8.4.0",
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
versionCode 23
versionName "1.0.3"
2017-05-03 23:48:22 +02:00
applicationId "com.github.dfa.diaspora_android"
resValue 'string', 'app_name', "dandelion*"
manifestPlaceholders = [appIcon: "@drawable/ic_launcher"]
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 {
flavorDefault {
2016-12-22 04:07:30 +01:00
}
2017-05-03 23:48:22 +02:00
/*
flavorGplay {
buildConfigField "boolean", "IS_GPLAY_BUILD", "true"
}
*/
flavorTest {
2017-05-03 23:48:22 +02:00
applicationId "com.github.dfa.secondlion"
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')
buildConfigField "boolean", "IS_TEST_BUILD", "true"
2016-12-22 04:07:30 +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}"
compile "com.android.support:design:${version_lib.appcompat}"
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
// 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-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-11-04 03:08:59 +01:00
// Called before building
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/", "")
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()