-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
90 lines (76 loc) · 2.83 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
buildscript {
repositories {
maven {
url 'https://artifactory.nisc.coop/artifactory/libs-release'
credentials {
username = "${artifactoryUser}"
password = "${artifactoryPassword}"
}
}
}
dependencies {
classpath "coop.nisc:git-version:1.2.0"
}
}
defaultTasks 'clean', 'build'
apply plugin: 'coop.nisc.gitversion'
if (!project.hasProperty("artifactoryUrl")) {
ext.artifactoryUrl = 'https://artifactory.nisc.coop/artifactory'
}
ext {
gitBranch = rootProject.gitVersion.branch
gitRevision = rootProject.gitVersion.revision
buildFilesDir = file("${rootProject.rootDir}/buildfiles")
localIvyBuildCache = file("${buildFilesDir}/nisc-repo")
userIvyCache = file("${System.properties['user.home']}/.ivy2/cache")
remoteRepositoryUrl = artifactoryUrl
applicationNamespace = "portal"
}
subprojects {
apply plugin: 'ivy-publish'
apply plugin: 'java'
group = 'coop.nisc'
version = rootProject.gitVersion.buildVersion
repositories {
ivy {
ivyPattern "${remoteRepositoryUrl}/ivy-nisc-repo/[organisation]/[module]/[revision]/[type]s/[artifact].[ext]"
artifactPattern "${remoteRepositoryUrl}/ivy-nisc-repo/[organisation]/[module]/[revision]/[type]s/[artifact].[ext]"
credentials {
username = "${artifactoryUser}"
password = "${artifactoryPassword}"
}
}
ivy {
ivyPattern "${remoteRepositoryUrl}/ivy-nisc-thirdparty-repo/[organisation]/[module]/[revision]/[type]s/[artifact].[ext]"
artifactPattern "${remoteRepositoryUrl}/ivy-nisc-thirdparty-repo/[organisation]/[module]/[revision]/[type]s/[artifact].[ext]"
credentials {
username = "${artifactoryUser}"
password = "${artifactoryPassword}"
}
}
maven {
url "${remoteRepositoryUrl}/libs-release"
credentials {
username = "${artifactoryUser}"
password = "${artifactoryPassword}"
}
}
}
publishing {
repositories {
ivy {
ivyPattern "${userIvyCache}/[organisation]/[module]/[revision]/[type]s/[artifact].[ext]"
artifactPattern "${userIvyCache}/[organisation]/[module]/[revision]/[type]s/[artifact].[ext]"
}
ivy {
ivyPattern "${localIvyBuildCache}/[organisation]/[module]/[revision]/[type]s/[artifact].[ext]"
artifactPattern "${localIvyBuildCache}/[organisation]/[module]/[revision]/[type]s/[artifact].[ext]"
}
}
}
}
task cleanIvyBuildCache(type: Delete) {
group 'Build'
description 'Deletes all build artifacts from the local Ivy build cache'
delete "${localIvyBuildCache}"
}