-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
115 lines (99 loc) · 3.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
plugins {
id "eu.xenit.docker" version "5.3.0" 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.maint) {
tags += "${version.major}.${version.minor}.${version.rev}.${version.maint}".toString()
}
if (version.label) {
tags += "${version.major}.${version.minor}.${version.rev}.${version.label}".toString()
if (version.maint) {
tags += "${version.major}.${version.minor}.${version.rev}.${version.maint}.${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.buildNumber}" }).collect(Collectors.toList());
}
return tags
}
def calcRepository(flavor, enterprise, customized) {
def repoName = (enterprise ? "private.docker.xenit.eu/alfresco-enterprise" : "docker.io/xenit")
if (customized)
return "${repoName}/alfresco-${flavor}-xenit"
else
return "${repoName}/alfresco-${flavor}"
}
subprojects {
apply plugin: 'java'
// use java 8 for tests to fix "javax.net.ssl.SSLHandshakeException: PKIX path validation failed: java.security.cert.CertPathValidatorException: Algorithm constraints check failed on signature algorithm: SHA1withRSA"
plugins.withType(JavaBasePlugin) {
java {
toolchain {
languageVersion = JavaLanguageVersion.of(8)
}
}
}
repositories {
mavenCentral()
maven {
url 'https://artifacts.alfresco.com/nexus/content/repositories/public/'
metadataSources {
artifact()
}
content {
includeModule 'org.alfresco', 'alfresco-solr'
includeModule 'org.alfresco', 'alfresco-solr4-distribution'
includeModule 'org.alfresco', 'alfresco-search-services'
}
}
maven {
name "cloudsmith-private"
url = "https://repo.xenit.eu/basic/private/maven/"
credentials {
username = property("eu.xenit.cloudsmith.username")
password = property("eu.xenit.cloudsmith.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"
}
}
}
sourceSets {
integrationTest {
java {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
srcDirs = ["${rootProject.projectDir}/src/integrationTest/java"]
}
}
}
configurations {
runtime
integrationTestCompile.extendsFrom testCompile
integrationTestRuntime.extendsFrom testRuntime
}
dependencies {
integrationTestCompile group: 'io.rest-assured', name: 'rest-assured', version: '3.0.1'
integrationTestCompile group: 'io.rest-assured', name: 'json-path', version: '3.0.1'
integrationTestCompile group: 'io.rest-assured', name: 'rest-assured-common', version: '3.0.1'
integrationTestCompile group: 'junit', name: 'junit', version: '4.11'
integrationTestRuntime group: 'org.glassfish.jaxb', name: 'jaxb-runtime', version: '2.3.2'
}
}