Merge pull request #3409 from k9mail/build_scripts

Some build script changes
This commit is contained in:
cketti 2018-05-23 20:04:37 +02:00 committed by GitHub
commit b241bf0c11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 102 additions and 113 deletions

View file

@ -1,4 +1,29 @@
buildscript {
ext {
buildConfig = [
'compileSdk': 27,
'minSdk': 15,
'buildTools': '27.0.3'
]
versions = [
'kotlin': '1.2.41',
'supportLibrary': '27.1.1',
'preferencesFix': '27.1.1.1',
'lifecycleExtensions': '1.1.0',
'okio': '1.14.0',
'timber': '4.5.1',
'koin': '0.9.1',
'commonsIo': '2.4',
'junit': '4.12',
'robolectric': '3.7.1',
'mockito': '2.18.0',
'mockitoKotlin': '1.5.0',
'truth': '0.35'
]
}
repositories {
jcenter()
google()
@ -6,24 +31,16 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}"
classpath "org.jetbrains.kotlin:kotlin-android-extensions:${kotlinVersion}"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
classpath "org.jetbrains.kotlin:kotlin-android-extensions:${versions.kotlin}"
}
}
project.ext {
testCoverage = project.hasProperty('testCoverage')
optimizeForDevelopment = project.hasProperty('optimizeForDevelopment') && optimizeForDevelopment == 'true'
}
subprojects {
project.plugins.whenPluginAdded { plugin ->
if ("com.android.build.gradle.AppPlugin".equals(plugin.class.name) ||
"com.android.build.gradle.LibraryPlugin".equals(plugin.class.name)) {
project.android.dexOptions.preDexLibraries = !rootProject.hasProperty('disablePreDex')
}
}
repositories {
jcenter()
google()

View file

@ -1,12 +0,0 @@
kotlinVersion=1.2.31
androidCompileSdkVersion=27
androidBuildToolsVersion=27.0.3
androidSupportLibraryVersion=27.1.1
timberVersion=4.5.1
koinVersion=0.9.1
robolectricVersion=3.7.1
junitVersion=4.12
mockitoVersion=2.18.0
okioVersion=1.14.0
truthVersion=0.35

View file

@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.5.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip

View file

@ -1,45 +1,44 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'org.jetbrains.kotlin.android'
if (!rootProject.optimizeForDevelopment) {
apply from: '../gradle/plugins/checkstyle-android.gradle'
apply from: '../gradle/plugins/findbugs-android.gradle'
}
apply from: '../gradle/plugins/checkstyle-android.gradle'
apply from: '../gradle/plugins/findbugs-android.gradle'
if (rootProject.testCoverage) {
apply plugin: 'jacoco'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:${kotlinVersion}"
implementation 'org.apache.james:apache-mime4j-core:0.8.1'
implementation 'org.apache.james:apache-mime4j-dom:0.8.1'
implementation "com.squareup.okio:okio:${okioVersion}"
implementation 'commons-io:commons-io:2.4'
implementation 'com.jcraft:jzlib:1.0.7'
implementation 'com.beetstra.jutf7:jutf7:1.0.0'
implementation "com.android.support:support-annotations:${androidSupportLibraryVersion}"
implementation "com.jakewharton.timber:timber:${timberVersion}"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${versions.kotlin}"
androidTestImplementation 'com.android.support.test:runner:0.4.1'
androidTestImplementation 'com.madgag.spongycastle:pg:1.51.0.0'
implementation "org.apache.james:apache-mime4j-core:0.8.1"
implementation "org.apache.james:apache-mime4j-dom:0.8.1"
implementation "com.squareup.okio:okio:${versions.okio}"
implementation "commons-io:commons-io:${versions.commonsIo}"
implementation "com.jcraft:jzlib:1.0.7"
implementation "com.beetstra.jutf7:jutf7:1.0.0"
implementation "com.android.support:support-annotations:${versions.supportLibrary}"
implementation "com.jakewharton.timber:timber:${versions.timber}"
testImplementation "org.robolectric:robolectric:${robolectricVersion}"
testImplementation "junit:junit:${junitVersion}"
testImplementation "com.google.truth:truth:${truthVersion}"
testImplementation "org.mockito:mockito-core:${mockitoVersion}"
androidTestImplementation "com.android.support.test:runner:0.4.1"
androidTestImplementation "com.madgag.spongycastle:pg:1.51.0.0"
testImplementation "org.robolectric:robolectric:${versions.robolectric}"
testImplementation "junit:junit:${versions.junit}"
testImplementation "com.google.truth:truth:${versions.truth}"
testImplementation "org.mockito:mockito-core:${versions.mockito}"
// The Android Gradle plugin doesn't seem to put the Apache HTTP Client on the runtime classpath anymore when
// running JVM tests.
testImplementation 'org.apache.httpcomponents:httpclient:4.5.5'
testImplementation "org.apache.httpcomponents:httpclient:4.5.5"
}
android {
compileSdkVersion androidCompileSdkVersion.toInteger()
buildToolsVersion androidBuildToolsVersion
compileSdkVersion buildConfig.compileSdk
buildToolsVersion buildConfig.buildTools
defaultConfig {
minSdkVersion 15
minSdkVersion buildConfig.minSdk
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

View file

@ -1,11 +1,9 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'org.jetbrains.kotlin.android'
apply plugin: 'org.jetbrains.kotlin.android.extensions'
if (!rootProject.optimizeForDevelopment) {
apply from: '../gradle/plugins/checkstyle-android.gradle'
apply from: '../gradle/plugins/findbugs-android.gradle'
}
apply from: '../gradle/plugins/checkstyle-android.gradle'
apply from: '../gradle/plugins/findbugs-android.gradle'
if (rootProject.testCoverage) {
apply plugin: 'jacoco'
@ -14,55 +12,57 @@ if (rootProject.testCoverage) {
//noinspection GroovyAssignabilityCheck
configurations.all {
resolutionStrategy {
force "com.android.support:support-annotations:${androidSupportLibraryVersion}"
force "com.android.support:support-annotations:${versions.supportLibrary}"
}
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${versions.kotlin}"
implementation project(':k9mail-library')
implementation project(':plugins:HoloColorPicker')
implementation project(':plugins:openpgp-api-lib:openpgp-api')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:${kotlinVersion}"
implementation "com.squareup.okio:okio:${okioVersion}"
implementation 'commons-io:commons-io:2.4'
implementation "com.android.support:support-v4:${androidSupportLibraryVersion}"
implementation "com.android.support:appcompat-v7:${androidSupportLibraryVersion}"
implementation 'com.takisoft.fix:preference-v7:27.1.1.1'
implementation 'com.takisoft.fix:preference-v7-datetimepicker:27.1.1.1'
implementation 'com.takisoft.fix:preference-v7-colorpicker:27.1.1.1'
implementation 'com.takisoft.fix:preference-v7-ringtone:27.1.1.1'
implementation "com.android.support:recyclerview-v7:${androidSupportLibraryVersion}"
implementation "android.arch.lifecycle:extensions:1.1.0"
implementation 'androidx.core:core-ktx:0.3'
implementation 'org.jsoup:jsoup:1.11.2'
implementation 'de.cketti.library.changelog:ckchangelog:1.2.1'
implementation 'com.github.bumptech.glide:glide:3.6.1'
implementation 'com.splitwise:tokenautocomplete:2.0.7'
implementation 'de.cketti.safecontentresolver:safe-content-resolver-v14:0.9.0'
implementation 'com.github.amlcurran.showcaseview:library:5.4.1'
implementation 'com.squareup.moshi:moshi:1.2.0'
implementation "com.jakewharton.timber:timber:${timberVersion}"
implementation 'net.jcip:jcip-annotations:1.0'
implementation 'org.apache.james:apache-mime4j-core:0.8.1'
implementation 'com.xwray:groupie:2.0.3'
implementation 'com.xwray:groupie-kotlin-android-extensions:2.0.3'
implementation "com.squareup.okio:okio:${versions.okio}"
implementation "commons-io:commons-io:${versions.commonsIo}"
implementation "com.android.support:support-v4:${versions.supportLibrary}"
implementation "com.android.support:appcompat-v7:${versions.supportLibrary}"
implementation "com.takisoft.fix:preference-v7:${versions.preferencesFix}"
implementation "com.takisoft.fix:preference-v7-datetimepicker:${versions.preferencesFix}"
implementation "com.takisoft.fix:preference-v7-colorpicker:${versions.preferencesFix}"
implementation "com.takisoft.fix:preference-v7-ringtone:${versions.preferencesFix}"
implementation "com.android.support:recyclerview-v7:${versions.supportLibrary}"
implementation "android.arch.lifecycle:extensions:${versions.lifecycleExtensions}"
implementation "androidx.core:core-ktx:0.3"
implementation "org.jsoup:jsoup:1.11.2"
implementation "de.cketti.library.changelog:ckchangelog:1.2.1"
implementation "com.github.bumptech.glide:glide:3.6.1"
implementation "com.splitwise:tokenautocomplete:2.0.7"
implementation "de.cketti.safecontentresolver:safe-content-resolver-v14:0.9.0"
implementation "com.github.amlcurran.showcaseview:library:5.4.1"
implementation "com.squareup.moshi:moshi:1.2.0"
implementation "com.jakewharton.timber:timber:${versions.timber}"
implementation "net.jcip:jcip-annotations:1.0"
implementation "org.apache.james:apache-mime4j-core:0.8.1"
implementation "com.xwray:groupie:2.0.3"
implementation "com.xwray:groupie-kotlin-android-extensions:2.0.3"
implementation "org.jetbrains.anko:anko-coroutines:0.10.4"
implementation "org.koin:koin-android-architecture:${koinVersion}"
implementation "org.koin:koin-android-architecture:${versions.koin}"
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
androidTestImplementation "com.android.support.test.espresso:espresso-core:3.0.1"
testImplementation "org.robolectric:robolectric:${robolectricVersion}"
testImplementation "junit:junit:${junitVersion}"
testImplementation "com.google.truth:truth:${truthVersion}"
testImplementation "org.mockito:mockito-core:${mockitoVersion}"
testImplementation "com.nhaarman:mockito-kotlin:1.5.0"
testImplementation "org.robolectric:robolectric:${versions.robolectric}"
testImplementation "junit:junit:${versions.junit}"
testImplementation "com.google.truth:truth:${versions.truth}"
testImplementation "org.mockito:mockito-core:${versions.mockito}"
testImplementation "com.nhaarman:mockito-kotlin:${versions.mockitoKotlin}"
testImplementation "org.jdom:jdom2:2.0.6"
testImplementation "org.koin:koin-test:${koinVersion}"
testImplementation "org.koin:koin-test:${versions.koin}"
}
android {
compileSdkVersion androidCompileSdkVersion.toInteger()
buildToolsVersion androidBuildToolsVersion
compileSdkVersion buildConfig.compileSdk
buildToolsVersion buildConfig.buildTools
defaultConfig {
applicationId "com.fsck.k9"
@ -71,7 +71,7 @@ android {
versionCode 27000
versionName '5.700-SNAPSHOT'
minSdkVersion 15
minSdkVersion buildConfig.minSdk
targetSdkVersion 22
generatedDensities = ['mdpi', 'hdpi', 'xhdpi']
@ -97,7 +97,7 @@ android {
debug {
applicationIdSuffix ".debug"
testCoverageEnabled rootProject.testCoverage
testCoverageEnabled testCoverage
buildConfigField "boolean", "DEVELOPER_MODE", "true"
}

View file

@ -1,8 +1,8 @@
apply plugin: 'com.android.library'
android {
compileSdkVersion androidCompileSdkVersion.toInteger()
buildToolsVersion androidBuildToolsVersion
compileSdkVersion buildConfig.compileSdk
buildToolsVersion buildConfig.buildTools
sourceSets {
main {

View file

@ -1,15 +1,11 @@
apply plugin: 'com.android.library'
// apply plugin: 'bintray-release' // must be applied after your artifact generating plugin (eg. java / com.android.library)
android {
compileSdkVersion androidCompileSdkVersion.toInteger()
buildToolsVersion androidBuildToolsVersion
compileSdkVersion buildConfig.compileSdk
buildToolsVersion buildConfig.buildTools
defaultConfig {
versionCode 8
versionName '9.0' // API-Version . minor
minSdkVersion 14
targetSdkVersion 22
minSdkVersion buildConfig.minSdk
}
// Do not abort build if lint finds errors
@ -19,18 +15,7 @@ android {
}
dependencies {
implementation "android.arch.lifecycle:extensions:1.1.0"
implementation "com.jakewharton.timber:timber:${timberVersion}"
implementation 'com.takisoft.fix:preference-v7:27.1.1.1'
implementation "android.arch.lifecycle:extensions:${versions.lifecycleExtensions}"
implementation "com.jakewharton.timber:timber:${versions.timber}"
implementation "com.takisoft.fix:preference-v7:${versions.preferencesFix}"
}
/*
publish {
userOrg = 'sufficientlysecure'
groupId = 'org.sufficientlysecure'
artifactId = 'openpgp-api'
version = '9.0'
description = 'The OpenPGP API provides methods to execute OpenPGP operations, such as sign, encrypt, decrypt, verify, and more without user interaction from background threads.'
website = 'https://github.com/open-keychain/openpgp-api'
}
*/