This repository has been archived by the owner on May 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
65 lines (55 loc) · 1.6 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
mavenCentral()
maven {
url "https://github.com/ehn-dcc-development/dgc-business-rules/packages/849466"
}
}
dependencies {
classpath Deps.tools_gradle_android
classpath Deps.tools_kotlin
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
ext {
def getGitHash = { ->
return "git rev-parse --short HEAD".execute().text.trim()
}
def getCommitCount = { ->
def code = new ByteArrayOutputStream()
exec {
commandLine 'git', 'rev-list', '--count', 'HEAD'
standardOutput = code
}
return Integer.parseInt(code.toString().trim())
}
commitCount = getCommitCount()
gitHash = getGitHash()
}
task buildAllArtifacts() {
group = 'Build'
description = 'Builds and copies all maven artifact into a folder that can then be used in another project as local repository'
dependsOn 'engine:publishAllPublicationsToMavenRepository'
doLast {
println 'Copying latest AAR files into local repository'
delete 'build/local-maven-repo'
copy {
from 'engine/build/outputs/maven-artifact'
include '**'
into 'build/local-maven-repo'
}
}
}