-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbuild.gradle
More file actions
105 lines (92 loc) · 3.35 KB
/
build.gradle
File metadata and controls
105 lines (92 loc) · 3.35 KB
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
apply plugin: 'java'
// For buildscript -> repositories -> maven
apply plugin: 'maven'
sourceCompatibility = 1.8
targetCompatibility = 1.8
// Load the version number. This file sits in resources to include it into the jar. Because the version
// is needed at runtime.
// Configure the maven repository deployment
install {
repositories.mavenInstaller {
// Set the version
pom.version = project.version
// Set the group/namespace for the maven repository deployment.
pom.groupId = project.groupId
// Give the artifact a 'base name' (The version is added to the 'base name')
pom.artifactId = project.artifactId
}
}
repositories {
if (project.hasProperty('local')) {
mavenLocal()
}
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
maven { url 'http://repository.activeeon.com/content/groups/proactive/'}
}
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
maven {
url "http://repository.activeeon.com/content/groups/proactive/"
}
}
dependencies {
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:1.2"
// Code Formatting dependencies
classpath "com.diffplug.gradle.spotless:spotless:2.4.0"
classpath "org.ow2.proactive:coding-rules:1.0.0"
delete "gradle/ext"
ant.unjar src: configurations.classpath.find { it.name.startsWith("coding-rules") }, dest: 'gradle/ext'
// END code formatting dependencies
}
}
apply from: "$rootDir/gradle/ext/coding-format.gradle"
configurations {
provided
}
sourceSets {
main {
main.compileClasspath += configurations.provided
test.compileClasspath += configurations.provided
test.runtimeClasspath += configurations.provided
}
}
dependencies {
compile 'org.projectlombok:lombok:1.16.6'
compile 'ch.qos.reload4j:reload4j:1.2.25'
provided 'org.ow2.proactive:scheduler-api:+'
testCompile group: 'org.hamcrest', name: 'hamcrest-all', version: '1.1'
testCompile('junit:junit:4.12') {
exclude module: 'hamcrest'
exclude module: 'hamcrest-core'
}
testCompile 'org.mockito:mockito-all:1.10.19'
}
// Upload the archives to the nexus repository. For execution, that needs to have
// the username and password set in the command line by -DnexusUsername=[username]
// and -DnexusPassword=[password]
uploadArchives {
repositories {
mavenDeployer {
// Set the version
pom.version = project.version
// Set the group/namespace for the maven repository deployment.
pom.groupId = project.groupId
// Give the artifact a 'base name' (The version is added to the 'base name')
pom.artifactId = project.artifactId
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')}")
}
}
}
}