1
0
Fork 0
mirror of https://github.com/gsantner/dandelion synced 2024-06-23 20:14:52 +02:00
dandelion/app/build.gradle
Gregor Santner 8a934b4a68
Lower gradle version so F-Droid can build it
==== detail begin ====
Available gradle versions: 4.0 3.5 3.4.1 3.4 3.3 3.2.1 3.2 3.1 3.0 2.14.1 2.14 2.13 2.12 2.11 2.10 2.9 2.8 2.7 2.6 2.5 2.4 2.3 2.2.1 2.2 2.1 1.12 1.11 1.10 1.9 1.8 1.7 1.6 1.4
Found 4.0.2 via distributionUrl
/opt/gradle/bin/gradle: line 9: /opt/gradle/versions/4.0.2/bin/gradle: No such file or directory
==== detail end ====
2017-08-05 12:26:04 +02:00

112 lines
3.3 KiB
Groovy

apply plugin: 'com.android.application'
ext {
version_sdk = [
compileSdk : 26,
buildTools : "26.0.1",
minSdk : 17,
//targetSdk: compileSdk,
]
version_sdk.targetSdk = version_sdk.compileSdk
version_lib = [
appcompat : "26.0.0",
butterknife : "8.7.0",
netcipher : "2.0.0-alpha1",
]
}
android {
compileSdkVersion version_sdk.compileSdk
buildToolsVersion version_sdk.buildTools
defaultConfig {
minSdkVersion version_sdk.minSdk
targetSdkVersion version_sdk.targetSdk
versionCode 22
versionName "1.0.2"
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"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
flavorDefault {
}
/*
flavorGplay {
buildConfigField "boolean", "IS_GPLAY_BUILD", "true"
}
*/
flavorTest {
applicationId "com.github.dfa.secondlion"
resValue 'string', 'app_name', "secondlion*"
manifestPlaceholders = [appIcon: "@drawable/ic_launcher_test"]
versionCode = Integer.parseInt(new Date().format('yyMMdd'))
versionName = new Date().format('yyMMdd')
buildConfigField "boolean", "IS_TEST_BUILD", "true"
}
}
lintOptions {
disable 'MissingTranslation'
}
}
dependencies {
// Sub-Projects
//compile project(':subprojectFromRoot')
// Jars
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
// Android standard libs
compile "com.android.support:appcompat-v7:${version_lib.appcompat}"
compile "com.android.support:design:${version_lib.appcompat}"
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}"
// UI libraries
compile "com.github.DASAR:ShiftColorPicker:v0.5"
// Tool libraries
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}"
}
// #####################
// Groovy Coding Area
// #####################
final String RAW_DIR = "app/src/main/res/raw"
final String[] ROOT_TO_RAW_COPYFILES = ["README.md", "LICENSE.md", "CHANGELOG.md", "CONTRIBUTORS.md"]
// Called before building
task copyRepoFiles(type: Copy) {
// 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())
}
}
tasks.copyRepoFiles.execute()