-
Notifications
You must be signed in to change notification settings - Fork 66
/
build.gradle
104 lines (87 loc) · 2.96 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
97
98
99
100
101
102
103
104
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
classpath 'net.researchgate:gradle-release:2.4.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
apply plugin: 'net.researchgate.release'
task build(dependsOn: [':core:build', ':mapzen-android-sdk:build', ':mapzen-places-api:build'])
allprojects {
repositories {
jcenter()
mavenLocal()
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
maven { url "https://maven.google.com" }
}
}
subprojects {
task verify(dependsOn: ['compileDebugSources',
'testDebugUnitTest',
'checkstyle',
'lint'])
task ktverify(dependsOn: ['verify',
'ktlintMainCheck'])
tasks.withType(Test) {
testLogging {
exceptionFormat "full"
events "skipped", "passed", "failed"
showStandardStreams true
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
task installSdk {
description 'Builds and installs the Mapzen Android SDK to the local maven repository'
dependsOn ':core:verify',
':core:install',
':mapzen-android-sdk:verify',
':mapzen-android-sdk:install'
}
task installPlaces {
description 'Builds and installs the Mapzen Places API to the local maven repository'
dependsOn ':core:verify',
':core:install',
':mapzen-places-api:verify',
':mapzen-places-api:install'
}
task installSdkDemo {
description 'Builds and installs the Mapzen Android SDK demo to a connected emulator or device'
dependsOn 'installSdk',
':samples_mapzen-android-sdk-sample:installDebug'
}
task installPlacesDemo {
description 'Builds and installs the Mapzen Places API demo to a connected emulator or device'
dependsOn 'installPlaces',
':samples_mapzen-places-api-sample:installDebug'
}
task installSdkSampleApp {
description 'Builds and installs the redesigned Mapzen Android SDK sample app to a connected emulator or device'
dependsOn 'installSdkSampleApp',
':samples_mapzen-sample:installDebug'
}
release {
tagTemplate = 'v${version}'
versionPropertyFile = 'gradle.properties'
versionProperties = ['VERSION_NAME']
newVersionCommitMessage = '[Gradle Release Plugin] - mapzen-android-sdk new version commit:'
}
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
}
}
}