-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle
81 lines (74 loc) · 2.72 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
ext {
var = '3.5.1'
configVar = { name ->
if (project.hasProperty(name)) {
logger.error("Using value from command line argument for {}", name)
return project.property(name)
}
def envValue = System.getenv(name)
if (envValue != null) {
logger.error("Using environment variable as value for {}.", name)
return envValue
}
Properties properties = new Properties()
def file = project.rootProject.file('local.properties')
if (file.exists()) {
properties.load(file.newDataInputStream())
def value = properties.getProperty(name)
if (value != null) {
logger.error("Using value from local configuration for {}.", name)
return value
} else {
logger.error("Value for variable {} not defined via local configuration or environment variable. Falling back to empty string.", name)
return ""
}
} else {
logger.error("Local configuration file not found and environment variable not set. Falling back to empty string for variable {}.", name)
return ""
}
}
}// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
room_version = '2.4.0-beta01'
nav_version = '2.3.5'
kotlin_version = '1.5.31'
}
repositories {
google()
mavenCentral()
gradlePluginPortal()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.4'
classpath 'com.google.gms:google-services:4.3.10'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version"
classpath "org.jmailen.gradle:kotlinter-gradle:3.7.0"
classpath "de.mannodermaus.gradle.plugins:android-junit5:1.7.1.1"
classpath "com.google.android.gms:oss-licenses-plugin:0.10.4"
classpath 'gradle.plugin.com.cookpad.android.plugin:plugin:1.2.8'
}
}
allprojects {
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
maven {
url 'https://api.mapbox.com/downloads/v2/releases/maven'
authentication {
basic(BasicAuthentication)
}
credentials {
username = 'mapbox'
password = configVar("MAPBOX_DOWNLOAD_TOKEN")
}
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}