-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathbuild.gradle
161 lines (134 loc) · 5.05 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
156
157
158
159
160
161
import com.github.jk1.license.render.*
buildscript {
repositories {
mavenCentral()
maven {
url "http://repository.activeeon.com/content/groups/proactive/"
}
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'org.springframework.boot:spring-boot-gradle-plugin:1.5.22.RELEASE'
classpath "com.diffplug.gradle.spotless:spotless:2.4.0"
classpath "org.ow2.proactive:coding-rules:1.0.0"
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.6.1"
classpath "io.spring.gradle:dependency-management-plugin:1.0.15.RELEASE"
classpath 'org.jsonschema2pojo:jsonschema2pojo-gradle-plugin:0.4.27'
classpath 'com.github.jk1:gradle-license-report:1.7'
}
dependencies {
delete "gradle/ext"
ant.unjar src: configurations.classpath.find { it.name.startsWith("coding-rules") }, dest: 'gradle/ext'
}
}
apply plugin: 'org.springframework.boot'
apply plugin: 'org.sonarqube'
apply plugin: 'com.github.jk1.dependency-license-report'
apply from: "$rootDir/gradle/ext/coding-format.gradle"
bootRepackage {
enabled = false
}
springBoot {
mainClass = 'org.ow2.proactive.scheduling.api.Application'
}
licenseReport {
configurations = ['runtime']
renderers = [new InventoryHtmlReportRenderer()]
}
allprojects {
apply plugin: "io.spring.dependency-management"
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'project-report'
group = 'org.ow2.proactive'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
defaultTasks 'clean', 'build', 'check'
dependencyManagement {
imports {
mavenBom "org.ow2.proactive:parent-bom:${version}"
dependencies {
dependency "com.graphql-java:graphql-java:17.6"
dependency "com.graphql-java:graphql-java-extended-scalars:17.1"
}
}
resolutionStrategy {
cacheChangingModulesFor 0, 'seconds'
}
}
dependencies {
testCompile 'com.google.truth:truth'
testCompile 'junit:junit'
testCompile 'org.mockito:mockito-core'
}
repositories {
if (project.hasProperty('local')) {
mavenLocal()
}
mavenCentral()
maven { url 'http://repository.activeeon.com/content/groups/proactive/' }
maven { url "https://repo.jenkins-ci.org/releases/" }
}
uploadArchives {
repositories {
mavenDeployer {
snapshotRepository(url: "http://repository.activeeon.com/content/repositories/snapshots/") {
authentication(userName: "${System.getProperty('nexusUsername')}",
password: "${System.getProperty('nexusPassword')}")
}
repository(url: "http://repository.activeeon.com/content/repositories/releases/") {
authentication(userName: "${System.getProperty('nexusUsername')}",
password: "${System.getProperty('nexusPassword')}")
}
}
}
}
sonarqube {
properties {
property "sonar.projectKey", "$project.group:scheduling-api"
property "sonar.projectName", "scheduling-api"
property "sonar.jdbc.driverClassName", "org.postgresql.Driver"
property "sonar.language", "java"
property "sonar.sources", "src/main"
property 'sonar.jacoco.reportPath', "${buildDir}/jacoco/testDebug.exec"
property 'sonar.junit.reportsPath', "${buildDir}/test-results"
}
}
sourceSets {
integrationTest {
java.srcDir file('src/integration-test/java')
resources.srcDir file('src/integration-test/resources')
compileClasspath = sourceSets.main.output + configurations.integrationTestCompile
runtimeClasspath = output + compileClasspath + configurations.integrationTestRuntime
}
}
task integrationTest(type: Test) {
testClassesDir = sourceSets.integrationTest.output.classesDir
classpath = sourceSets.integrationTest.runtimeClasspath
classpath += sourceSets.test.runtimeClasspath
testLogging {
events "passed", "skipped", "failed"
}
}
check.dependsOn integrationTest
configurations {
// The following module is excluded to avoid clashes when embedded inside the ProActive Scheduler
all*.exclude module: 'spring-boot-starter-logging'
integrationTestCompile.extendsFrom testCompile
integrationTestRuntime.extendsFrom testRuntime
}
idea {
module {
testSourceDirs += file('src/integration-test/java')
testSourceDirs += file('src/integration-test/resources')
scopes.TEST.plus += [
configurations.integrationTestCompile,
configurations.integrationTestRuntime
]
}
}
}