This repository has been archived by the owner on May 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
/
build.gradle
96 lines (77 loc) · 2.74 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
apply from: 'buildsystem/dependencies.gradle'
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.3.31'
repositories {
mavenLocal()
maven {
url 'https://plugins.gradle.org/m2/'
}
maven {
url = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
}
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'net.ltgt.gradle:gradle-errorprone-plugin:0.0.14'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
maven {
url = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
}
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
mavenCentral()
google()
}
// 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 {
// SDK versions
// POM file
GROUP = "com.nytimes.android"
VERSION_NAME = "0.0.9-SNAPSHOT"
POM_PACKAGING = "pom"
POM_DESCRIPTION = "register"
POM_URL = "https://github.com/nytimes/register/"
POM_SCM_URL = "https://github.com/nytimes/register/"
POM_SCM_CONNECTION = "scm:git:https://github.com/nytm/register.git"
POM_SCM_DEV_CONNECTION = "scm:git:[email protected]:nytm/register.git"
POM_LICENCE_NAME = "Apache License"
POM_LICENCE_URL = "http://www.apache.org/licenses/"
POM_LICENCE_DIST = "repo"
POM_DEVELOPER_ID = "nytimesandroid"
POM_DEVELOPER_NAME = "New York Times"
}
// From command line use: -PdisablePreDex to disable it: primarily for jenkins
project.ext.preDexLibs = !project.hasProperty('disablePreDex')
subprojects {
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
}
}
project.plugins.apply('net.ltgt.errorprone')
configurations.errorprone {
resolutionStrategy.force 'com.google.errorprone:error_prone_core:2.0.15'
}
}
task gitHooksInit (type:Exec) {
workingDir "$projectDir"
commandLine './init-git-hooks'
}