-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
137 lines (117 loc) · 4.54 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
apply plugin: 'java'
apply plugin: 'application'
apply plugin: 'idea'
apply plugin: 'maven'
apply from: "$rootDir/gradle/ext/coding-format.gradle"
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_8
mainClassName = 'jsr223.powershell.Main'
defaultTasks 'installApp'
buildscript {
repositories {
if (project.hasProperty('local')) {
mavenLocal()
}
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
maven { url 'http://repository.activeeon.com/content/groups/proactive/' }
maven {
url "https://repo.jenkins-ci.org/releases/"
}
}
dependencies {
classpath "com.diffplug.gradle.spotless:spotless:2.4.0"
classpath "org.ow2.proactive:coding-rules:1.0.0"
}
dependencies {
delete "gradle/ext"
ant.unjar src: configurations.classpath.find { it.name.startsWith("coding-rules") }, dest: 'gradle/ext'
}
}
rootProject.buildscript.repositories.each {
repositories.add(it)
}
// 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
}
}
configurations {
provided
nativeLib
}
sourceSets {
main {
compileClasspath += configurations.provided
}
}
idea {
module {
scopes.PROVIDED.plus += [configurations.provided]
}
}
dependencies {
provided "org.ow2.proactive:scheduler-api:${schedulingVersion}"
provided "org.ow2.proactive:scheduler-node:${schedulingVersion}"
testCompile "org.ow2.proactive:scheduler-api:${schedulingVersion}"
testCompile "org.ow2.proactive:scheduler-node:${schedulingVersion}"
// jni4net requires jar and dll to be in the same directory, accordingly, it is difficult to use the maven jar artifact
compile files("${projectDir}/tools/jni4net.j-0.8.8.0.jar")
provided 'commons-io:commons-io:2.5'
provided 'org.apache.commons:commons-lang3:3.4'
provided 'log4j:log4j:1.2.17'
//compile 'net.sf.jni4net:jni4net.j:0.8.8.0'
runtime files("${projectDir}/tools/jni4net.n-0.8.8.0.dll")
runtime files("${projectDir}/tools/jni4net.n.w64.v40-0.8.8.0.dll")
runtime files("${projectDir}/tools/jni4net.n.w32.v40-0.8.8.0.dll")
runtime files("${projectDir}/tools/jni4net.n.w64.v20-0.8.8.0.dll")
runtime files("${projectDir}/tools/jni4net.n.w32.v20-0.8.8.0.dll")
runtime files("${projectDir}/tools/jsr223utils.dll")
nativeLib files("${projectDir}/tools/jni4net.j-0.8.8.0.jar")
nativeLib files("${projectDir}/tools/jni4net.n-0.8.8.0.dll")
nativeLib files("${projectDir}/tools/jni4net.n.w64.v40-0.8.8.0.dll")
nativeLib files("${projectDir}/tools/jni4net.n.w32.v40-0.8.8.0.dll")
nativeLib files("${projectDir}/tools/jni4net.n.w64.v20-0.8.8.0.dll")
nativeLib files("${projectDir}/tools/jni4net.n.w32.v20-0.8.8.0.dll")
nativeLib files("${projectDir}/tools/jsr223utils.dll")
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile 'com.google.guava:guava:32.0.1-jre'
}
task nativeLibJar(type: Jar) {
classifier = 'native'
from configurations.nativeLib
}
artifacts {
archives nativeLibJar
}
// 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')}")
}
}
}
}