-
Notifications
You must be signed in to change notification settings - Fork 31
/
build.gradle
155 lines (127 loc) · 4.19 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
buildscript {
ext.javax_annotations_version='2.0.1.Final'
repositories {
mavenCentral()
}
dependencies {
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.7"
}
}
plugins {
id "be.vbgn.ci-detect" version "0.5.0"
id "biz.aQute.bnd.builder" version "4.2.0" apply false
id "org.sonarqube" version "3.5.0.2730"
}
apply from: "${rootProject.projectDir}/gradle/versions.gradle"
sonarqube {
properties {
property "sonar.projectKey", "dynamic-extensions-for-alfresco"
property "sonar.organization", "xenit-eu"
property "sonar.host.url", "https://sonarcloud.io"
}
}
allprojects {
group = 'eu.xenit.de'
version = '3.2.0'
boolean isRelease = ci.branch?.startsWith("release")
if (!isRelease) {
version += "-SNAPSHOT"
}
project.pluginManager.withPlugin('java-base') {
project.sourceCompatibility = 11
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
options.compilerArgs << '-Xlint:unchecked'
}
repositories {
maven {
url "${rootProject.projectDir}/alfresco-bom-repo"
allowInsecureProtocol = true
}
mavenCentral()
jcenter()
maven {
url "https://artifacts.alfresco.com/nexus/content/groups/public/"
}
maven {
url 'https://artifacts.alfresco.com/nexus/content/groups/private'
credentials {
username project.property('org.alfresco.maven.nexus.username')
password project.property('org.alfresco.maven.nexus.password')
}
}
maven {
url "http://repository.springsource.com/maven/bundles/release"
allowInsecureProtocol = true
}
maven {
url "http://repository.springsource.com/maven/bundles/external"
allowInsecureProtocol = true
}
}
}
def getSimpleAlfrescoVersionFromProjectName(final String projectName) {
for (final String shortVersion : alfrescoVersions.keySet()) {
if (projectName.endsWith(shortVersion)) {
// Subproject for a specific Alfresco version
return shortVersion;
}
}
// Return a default version for project that require an Alfresco dependency for javadoc only
return "61";
}
subprojects {
if (project.name == 'integration-tests'
|| project.parent.name == 'integration-tests'
|| project.name == 'blueprint-integration') {
return
}
ext {
simpleAlfrescoVersion = getSimpleAlfrescoVersionFromProjectName(project.name)
alfrescoVersion = alfrescoVersions.get(simpleAlfrescoVersion)
springVersion = springVersions.get(simpleAlfrescoVersion)
alfrescoBom = "eu.xenit.alfresco:alfresco-community-bom:${alfrescoVersion}"
// '3.0.0.M01' for Alfresco 6.0
// '1.0.2.RELEASE' for Alfresco 5.x
geminiVersion = geminiVersions.get(simpleAlfrescoVersion)
osgiVersion = '6.0.0'
felixVersion = '6.0.3'
slf4jVersion = '1.7.7'
junitVersion = '4.12'
springOsgiUtilVersion = '2.0.5.RELEASE'
mockitoVersion = '1.10.19'
jibxVersion = '1.2.3'
hibernateVersion = '3.2.6.ga'
servletVersion = '2.5'
bndVersion = '2.4.1'
javaxAnnotationApiVersion = '1.3.2'
jaxbApiVersion = '2.3.0'
}
if (project.name == 'alfresco-dynamic-extensions-repo' || project.parent.name == 'alfresco-dynamic-extensions-repo'
|| project.name == 'gradle-plugin') {
return
}
apply plugin: 'java'
apply plugin: 'jacoco'
task sourceJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
apply from: "${rootProject.projectDir}/publish.gradle"
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourceJar
artifact javadocJar
}
}
}
}
defaultTasks 'build'
ext.versionFile = "${project.buildDir}/version"