-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathbuild.gradle
80 lines (71 loc) · 2.1 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
buildscript {
ext.kotlin_version = '1.6.10'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath 'com.google.gms:google-services:4.3.15'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.9'
}
}
plugins {
id "nebula.lint" version "16.9.0"
}
allprojects {
repositories {
jcenter()
mavenCentral()
maven { url 'https://maven.google.com' }
//maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://jitpack.io" }
}
// Nebula
// apply plugin :"nebula.lint"
// gradleLint {
// rules=['unused-dependency']
// }
}
task clean(type: Delete) {
delete rootProject.buildDir
}
// Loads properties from the giving filepath.
ext.loadProperties = { filepath ->
def propertiesFile = new File(filepath)
def properties = new Properties()
properties.load(new FileInputStream(propertiesFile))
return properties
}
// Loads properties from the giving filepath, or simply
// returns empty properties if the file does not exist.
ext.optionallyLoadProperties = { filepath ->
try {
return loadProperties(filepath)
} catch (IOException ignored) {
project.logger.error("Properties file not found: " + filepath)
return new Properties()
}
}
ext.loadLocalProperties = { project ->
try {
def localPropertiesFile = project.file("local.properties")
return loadProperties(localPropertiesFile.absolutePath)
} catch (IOException ignored) {
project.logger.error("local.properties file not found")
return new Properties()
}
}
ext.isCI = {
return System.getenv("GITHUB_ACTIONS") == "true"
}
ext.getReleaseConfigDir = {
if (isCI()) {
return "${project.rootDir}/tools/config/debug"
} else {
return "${project.rootDir}/tools/config/release"
}
}
apply from: 'gradleScript/dependencies.gradle'
apply plugin: 'com.frolo.plugin.measure_build'