-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathbuild.gradle
91 lines (82 loc) · 3.07 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.3.41'
repositories {
google()
jcenter()
maven { url uri('./thirdpart/repo') }
maven { url 'https://dl.bintray.com/umsdk/release' }
maven { url 'http://storage.googleapis.com/r8-releases/raw' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.1'
classpath 'com.novoda:bintray-release:0.8.1'
classpath 'com.bcm.plugin.fcm:analytics_disable:1.0.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.6'
}
}
allprojects {
repositories {
google()
jcenter()
maven { url uri('../thirdpart/repo') }
maven { url 'https://dl.bintray.com/umsdk/release' }
maven { url "https://jitpack.io" }
maven {
url "https://s3.amazonaws.com/repo.commonsware.com"
}
}
subprojects {
afterEvaluate { project ->
if (project.hasProperty("android")) {
android {
defaultConfig {
manifestPlaceholders = [ApplicationId: getAppId()]
buildConfigField "String", "BCM_APPLICATION_ID", "\"${getAppId()}\""
}
}
}
}
}
configurations {
compile.resolutionStrategy {
eachDependency { DependencyResolveDetails details ->
def requested = details.requested
//specifying a fixed version for all libraries with 'com.android.support' group
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '26.1.0'
}
} else if (requested.group == 'androidx.appcompat') {
if (requested.name == 'appcompat') {
details.useVersion '1.1.0'
}
} else if (requested.group == 'androidx.core') {
if (requested.name == 'core') {
details.useVersion '1.1.0'
} else if (requested.name == 'core-ktx') {
details.useVersion '1.1.0'
}
} else if (requested.group == 'androidx.arch.core') {
details.useVersion '2.1.0'
} else if (requested.group == 'androidx.lifecycle') {
details.useVersion '2.1.0'
} else if (requested.group == 'androidx.fragment') {
details.useVersion '1.1.0'
} else if (requested.group == 'androidx.activity') {
details.useVersion '1.0.0'
}
}
}
}
}
static def getAppId() {
return "com.bcm.messenger.dev"
}
static def branch() {
return System.getenv("GIT_BRANCH") ?: ""
}
task clean(type: Delete) {
delete rootProject.buildDir
}