Store/build.gradle
ychescale9 1810355341 Update dependencies and clean up unused ones (#16)
* Update dependencies and clean up unused ones.

* Update okio to 2.4.1 and migrate deprecated APIs to extension functions.

* Update platform and build-tools in travis config.
2019-12-10 20:12:51 -05:00

98 lines
3 KiB
Groovy

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
mavenCentral()
maven {
url 'https://plugins.gradle.org/m2/'
}
google()
jcenter()
}
ext.versions = [
androidGradlePlugin : '3.6.0-beta05',
dexcountGradlePlugin: '1.0.2',
kotlin : '1.3.61',
dokkaGradlePlugin : '0.10.0',
ktlintGradle : '9.1.1',
spotlessGradlePlugin: '3.26.1'
]
dependencies {
classpath "com.android.tools.build:gradle:${versions.androidGradlePlugin}"
classpath "com.getkeepsafe.dexcount:dexcount-gradle-plugin:${versions.dexcountGradlePlugin}"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:${versions.dokkaGradlePlugin}"
classpath "org.jlleitschuh.gradle:ktlint-gradle:${versions.ktlintGradle}"
classpath "com.diffplug.spotless:spotless-plugin-gradle:${versions.spotlessGradlePlugin}"
}
}
apply from: 'buildsystem/dependencies.gradle'
allprojects {
repositories {
mavenCentral()
google()
jcenter()
}
apply plugin: 'org.jlleitschuh.gradle.ktlint'
ktlint {
version = versions.ktlint
disabledRules = ["import-ordering"]
}
// Workaround to prevent Gradle from stealing focus from other apps during tests run/etc.
// https://gist.github.com/artem-zinnatullin/4c250e04636e25797165
tasks.withType(JavaForkOptions) {
jvmArgs '-Djava.awt.headless=true'
}
}
ext {
// POM file
GROUP = "com.dropbox.mobile.store"
VERSION_NAME = "4.0.0-SNAPSHOT"
POM_PACKAGING = "pom"
POM_DESCRIPTION = "Store4 is built with Kotlin Coroutines"
POM_URL = "https://github.com/dropbox/Store/"
POM_SCM_URL = "https://github.com/dropbox/Store/"
POM_SCM_CONNECTION = "scm:git:https://github.com/dropbox/Store.git"
POM_SCM_DEV_CONNECTION = "scm:git:git@github.com:dropbox/Store.git"
POM_LICENCE_NAME = "Apache License"
POM_LICENCE_URL = "http://www.apache.org/licenses/LICENSE-2.0"
POM_LICENCE_DIST = "repo"
POM_DEVELOPER_ID = "dropbox"
POM_DEVELOPER_NAME = "Dropbox"
}
// From command line use: -PdisablePreDex to disable it: primarily for jenkins
project.ext.preDexLibs = !project.hasProperty('disablePreDex')
subprojects {
apply plugin: 'com.diffplug.gradle.spotless'
spotless {
kotlin {
target 'src/**/*.kt'
}
}
project.plugins.whenPluginAdded { plugin ->
if ("com.android.build.gradle.AppPlugin".equals(plugin.class.name)) {
project.android.dexOptions.preDexLibraries = rootProject.ext.preDexLibs
} else if ("com.android.build.gradle.LibraryPlugin".equals(plugin.class.name)) {
project.android.dexOptions.preDexLibraries = rootProject.ext.preDexLibs
}
}
}
task gitHooksInit(type: Exec) {
workingDir "$projectDir"
commandLine './init-git-hooks'
}