forked from ThePowerOfSwift/LiveEdgeDetection
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
75 lines (67 loc) · 2.52 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
buildscript {
ext.kotlin_version = '1.4.10'
repositories {
google()
jcenter()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.2'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath 'com.google.gms:google-services:4.3.4'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jlleitschuh.gradle:ktlint-gradle:9.4.1"
}
}
subprojects {
apply plugin: "org.jlleitschuh.gradle.ktlint"
// Optionally configure plugin
ktlint {
debug = false
}
}
allprojects {
repositories {
google()
jcenter()
maven { url 'https://jitpack.io' }
maven {
url 'https://artifactory.mxtracks.info/artifactory/gradle-dev-local/'
// def artifactoryPW = project.hasProperty("artifactory_password") ? artifactory_password : System.getenv("ARTIFACTORY_USER_PASSWORD")
// if (artifactoryPW == null) {
// out.style(Style.Normal).text("Artifactory has no password eiter you add in gradle.properties ")
// .style(Style.Failure).text(" artifactory_password=<your secret>")
// out.style(Style.Normal).text(" or specify an envirionment variable ")
// .style(Style.Failure).text("export ARTIFACTORY_USER_PASSWORD=<your secret>")
// } else
// out.style(Style.Normal).text("Artifactory password >${artifactoryPW.take(1)}..<")
//
// credentials {
// username = project.hasProperty("artifactory_user") ? project.artifactory_user : System.getenv("ARTIFACTORY_USER_NAME")
// password = artifactoryPW
// }
}
}
}
@SuppressWarnings("unused")
static def getGitCommitCount() {
def process = "git rev-list HEAD --count".execute()
return process.text.toInteger()
}
@SuppressWarnings("unused")
static def getTag() {
def tagVersion = "$System.env.TAG_VERSION"
if (tagVersion == "null") {
println "No variable TAG_VERSION specified, I'm using 'git describe --abbrev=0'"
def process = "git describe --abbrev=0".execute()
tagVersion = process.text.toString().trim()
} else {
def tagVersionToken = tagVersion.split("/")
tagVersion = tagVersionToken[2]
}
return tagVersion
}
task clean(type: Delete) {
delete rootProject.buildDir
}