This repository has been archived by the owner on May 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
68 lines (61 loc) · 2.33 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
plugins {
id "eu.xenit.docker-alfresco" version "5.1.1" apply false
id "be.vbgn.ci-detect" version "0.5.0"
}
import java.util.stream.Collectors
def calcTags(version) {
def tags = [
"${version.major}.${version.minor}.${version.rev}".toString(),
"${version.major}.${version.minor}".toString()
]
if (version.label) {
tags += "${version.major}.${version.minor}.${version.rev}.${version.label}".toString()
}
// For non-master/non-release builds, change the tags to contain branch and build number
def isTestBuild = ci.isCi() && ci.branch != "master" && ci.branch != "release"
if(isTestBuild) {
tags = tags.stream().map({ it + "-build-${ci.branch}-${ci.buildNumber}" }).collect(Collectors.toList());
}
return tags
}
def calcRepository(flavor) {
def repoName = project.properties.getOrDefault("repoName", "hub.xenit.eu");
if(repoName == "hub.xenit.eu") {
def namespace = (flavor == "enterprise") ? "alfresco-enterprise" : "public";
repoName += "/" + namespace;
}
return "${repoName}/alfresco-share-${flavor}";
}
subprojects {
apply plugin: 'java'
repositories {
mavenCentral()
maven {
url 'https://artifacts.alfresco.com/nexus/content/repositories/public/'
}
// This private repository provides Xenit with Alfresco enterprise artefacts.
// External developers should replace it with their own library repository.
if(project.hasProperty('eu.xenit.artifactory.username') && project.hasProperty('eu.xenit.artifactory.password')) {
maven {
name 'Xenit artifactory release local'
url 'https://artifactory.xenit.eu/artifactory/libs-release'
credentials {
username property("eu.xenit.artifactory.username")
password property("eu.xenit.artifactory.password")
}
}
}
}
pluginManager.withPlugin('eu.xenit.docker-config') {
docker {
if (System.getenv("DOCKER_USER") != null) {
registryCredentials {
username = System.getenv("DOCKER_USER")
password = System.getenv("DOCKER_PASSWORD")
}
} else {
logger.debug "using default credentials"
}
}
}
}