2016-11-29 18:59:48 +00:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
Update SDK, build tools, gradle, AGP, Kotlin, and library dependencies. (#371)
* Update SDK, build tools, gradle, AGP, Kotlin, and library dependencies.
* Update travis config with new SDK version.
2019-01-07 14:05:05 +00:00
|
|
|
mavenCentral()
|
2016-11-29 18:59:48 +00:00
|
|
|
maven {
|
|
|
|
url 'https://plugins.gradle.org/m2/'
|
|
|
|
}
|
2017-08-17 17:48:12 +00:00
|
|
|
google()
|
2019-08-28 01:43:48 +00:00
|
|
|
jcenter()
|
2016-11-29 18:59:48 +00:00
|
|
|
}
|
|
|
|
|
2019-12-10 15:51:14 +00:00
|
|
|
ext.versions = [
|
2020-01-28 17:02:28 +00:00
|
|
|
androidGradlePlugin : '4.0.0-alpha09',
|
2019-12-11 01:12:51 +00:00
|
|
|
kotlin : '1.3.61',
|
2019-12-10 15:51:14 +00:00
|
|
|
dokkaGradlePlugin : '0.10.0',
|
|
|
|
ktlintGradle : '9.1.1',
|
2019-12-11 01:12:51 +00:00
|
|
|
spotlessGradlePlugin: '3.26.1'
|
2017-06-23 01:22:34 +00:00
|
|
|
]
|
|
|
|
|
2016-11-29 18:59:48 +00:00
|
|
|
dependencies {
|
2019-12-10 15:51:14 +00:00
|
|
|
classpath "com.android.tools.build:gradle:${versions.androidGradlePlugin}"
|
|
|
|
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}"
|
2016-11-29 18:59:48 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-11-09 22:02:01 +00:00
|
|
|
apply from: 'buildsystem/dependencies.gradle'
|
|
|
|
|
2016-11-29 18:59:48 +00:00
|
|
|
allprojects {
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
2019-11-24 02:34:10 +00:00
|
|
|
google()
|
2019-02-11 00:23:00 +00:00
|
|
|
jcenter()
|
2016-11-29 18:59:48 +00:00
|
|
|
}
|
|
|
|
|
2019-12-10 15:51:14 +00:00
|
|
|
apply plugin: 'org.jlleitschuh.gradle.ktlint'
|
|
|
|
ktlint {
|
|
|
|
version = versions.ktlint
|
|
|
|
disabledRules = ["import-ordering"]
|
|
|
|
}
|
|
|
|
|
2019-02-11 00:23:00 +00:00
|
|
|
|
2016-11-29 18:59:48 +00:00
|
|
|
// 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'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-01-04 19:17:53 +00:00
|
|
|
ext {
|
|
|
|
// POM file
|
2019-12-09 19:35:38 +00:00
|
|
|
GROUP = "com.dropbox.mobile.store"
|
2020-02-13 19:40:22 +00:00
|
|
|
VERSION_NAME = "4.0.0-alpha03"
|
2017-01-04 19:17:53 +00:00
|
|
|
POM_PACKAGING = "pom"
|
2019-12-05 18:52:47 +00:00
|
|
|
POM_DESCRIPTION = "Store4 is built with Kotlin Coroutines"
|
2017-01-04 19:17:53 +00:00
|
|
|
|
2019-12-09 19:35:38 +00:00
|
|
|
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"
|
2017-01-04 19:17:53 +00:00
|
|
|
|
|
|
|
POM_LICENCE_NAME = "Apache License"
|
2019-12-09 19:35:38 +00:00
|
|
|
POM_LICENCE_URL = "http://www.apache.org/licenses/LICENSE-2.0"
|
2017-01-04 19:17:53 +00:00
|
|
|
POM_LICENCE_DIST = "repo"
|
|
|
|
|
2019-12-09 19:35:38 +00:00
|
|
|
POM_DEVELOPER_ID = "dropbox"
|
|
|
|
POM_DEVELOPER_NAME = "Dropbox"
|
2017-01-04 19:17:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-11-29 18:59:48 +00:00
|
|
|
// From command line use: -PdisablePreDex to disable it: primarily for jenkins
|
|
|
|
project.ext.preDexLibs = !project.hasProperty('disablePreDex')
|
|
|
|
|
|
|
|
subprojects {
|
2019-11-09 22:02:01 +00:00
|
|
|
apply plugin: 'com.diffplug.gradle.spotless'
|
|
|
|
spotless {
|
|
|
|
kotlin {
|
|
|
|
target 'src/**/*.kt'
|
|
|
|
}
|
|
|
|
}
|
2019-12-10 15:51:14 +00:00
|
|
|
|
2019-12-17 22:39:08 +00:00
|
|
|
def preDexClosure = {
|
|
|
|
project.android.dexOptions.preDexLibraries = rootProject.ext.preDexLibs
|
2016-11-29 18:59:48 +00:00
|
|
|
}
|
|
|
|
|
2019-12-26 18:21:52 +00:00
|
|
|
project.plugins.withType(com.android.build.gradle.AppPlugin).whenPluginAdded(preDexClosure)
|
|
|
|
project.plugins.withType(com.android.build.gradle.LibraryPlugin).whenPluginAdded(preDexClosure)
|
2019-12-05 18:52:47 +00:00
|
|
|
}
|
2020-01-07 19:08:53 +00:00
|
|
|
|