Store/build.gradle

91 lines
2.6 KiB
Groovy
Raw Normal View History

2016-11-29 18:59:48 +00:00
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.3.50'
2016-11-29 18:59:48 +00:00
repositories {
mavenCentral()
2016-11-29 18:59:48 +00:00
maven {
url 'https://plugins.gradle.org/m2/'
}
google()
jcenter()
2016-11-29 18:59:48 +00:00
}
rootProject.ext.versions = [
kotlin: '1.3.50'
]
2016-11-29 18:59:48 +00:00
dependencies {
classpath 'com.android.tools.build:gradle:3.6.0-beta04'
2016-11-29 18:59:48 +00:00
classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.5.6'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$rootProject.ext.versions.kotlin"
classpath 'org.jetbrains.dokka:dokka-gradle-plugin:0.10.0'
2016-11-29 18:59:48 +00:00
}
}
plugins {
id 'com.diffplug.gradle.spotless' version '3.25.0'
}
apply from: 'buildsystem/dependencies.gradle'
2016-11-29 18:59:48 +00:00
allprojects {
2019-02-11 00:23:00 +00:00
buildscript {}
2016-11-29 18:59:48 +00:00
repositories {
mavenCentral()
google()
2019-02-11 00:23:00 +00:00
jcenter()
2016-11-29 18:59:48 +00:00
}
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"
VERSION_NAME = "4.0.0-SNAPSHOT"
2017-01-04 19:17:53 +00:00
POM_PACKAGING = "pom"
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 {
apply plugin: 'com.diffplug.gradle.spotless'
spotless {
kotlin {
target 'src/**/*.kt'
}
}
2016-11-29 18:59:48 +00:00
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'
}