-
Notifications
You must be signed in to change notification settings - Fork 34
/
build.gradle
132 lines (114 loc) · 3.91 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
buildscript {
repositories {
mavenLocal()
mavenCentral()
jcenter()
}
dependencies {
classpath 'org.dm.gradle:gradle-bundle-plugin:0.10.0'
classpath 'com.netflix.nebula:nebula-release-plugin:6.3.5'
}
}
plugins {
id 'com.github.lburgazzoli.karaf' version '0.0.49'
}
apply from: 'dependencies.gradle'
allprojects {
group "io.subutai.peeros"
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'nebula.nebula-release'
if (new File("$project.projectDir/bnd.bnd").exists()) {
apply plugin: 'org.dm.bundle'
bundle {
instruction '-include', 'bnd.bnd'
failOnError = true
}
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
configurations {
all {
resolutionStrategy {
failOnVersionConflict()
}
}
feature
feature.transitive = false
archives.extendsFrom feature
compileOnly.extendsFrom feature
testCompile.extendsFrom feature
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = "sources"
from sourceSets.main.allSource
}
repositories {
mavenLocal()
mavenCentral()
jcenter()
}
artifacts {
archives sourcesJar
}
uploadArchives.repositories.mavenDeployer {
if (version =~ /^[0-9]+(\.[0-9]+(\.[0-9]+)?)?$/) { // official releases
repository(url: nexusUrlMavenReleases) {
authentication(userName: "$nexusUsername", password: "$nexusPassword")
}
} else if (version =~ /^[0-9]+(\.[0-9]+(\.[0-9]+)?)?-SNAPSHOT$/) { // Maven-styled SNAPSHOTs
snapshotRepository(url: nexusUrlMavenSnapshots) {
authentication(userName: "$nexusUsername", password: "$nexusPassword")
}
} else {
// devSnapshots of different types
repository(url: nexusUrlMavenDevSnapshots) {
authentication(userName: "$nexusUsername", password: "$nexusPassword")
}
}
}
test {
workingDir = file(project.projectDir)
}
tasks.assemble.dependsOn(test)
tasks.uploadArchives.dependsOn(assemble)
rootProject.tasks.release.dependsOn(uploadArchives)
if (ciBuild.toBoolean()) {
// Enable Integration Tests?
// Enable Performance Tests?
// Enable Test Coverage measurement and report?
// Enable Sonar Output?
}
}
tasks.assemble.dependsOn(test)
tasks.uploadArchives.dependsOn(assemble)
tasks.release.dependsOn(uploadArchives)
task testReport(type: TestReport) {
destinationDir = file("$buildDir/reports/allTests")
// Include the results from the `test` task in all subprojects
reportOn subprojects*.test
}
test.finalizedBy(testReport)
karaf {
features {
xsdVersion = '1.4.0'
description = 'Subutai Feature Repository'
repository "mvn:org.ops4j.pax.jdbc/pax-jdbc-features/1.1.0/xml/features"
repository "mvn:org.ops4j.pax.useradmin/pax-useradmin/2.0.0-SNAPSHOT/xml/features"
repository "mvn:org.hibernate/hibernate-osgi/5.2.10.Final/xml/karaf"
repository "mvn:org.apache.cxf.karaf/apache-cxf/3.1.12/xml/features"
repository "mvn:org.apache.karaf.features/enterprise/4.1.2/xml/features"
repository "mvn:org.apache.activemq/activemq-karaf/5.15.0/xml/features-core"
repository "mvn:org.apache.karaf.features/spring/4.1.2/xml/features"
feature {
name = 'io.subutai.peeros'
description = 'Subutai PeerOS feature'
// Don't eagerly start the publisher until our
// custom ResourceFilter is installed.
bundle('com.eclipsesource.jaxrs:publisher:5.3.1') {
attribute 'start', 'false'
}
feature 'pax-useradmin-service'
}
}
}