forked from blackducksoftware/sdk-client-tools-protex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
106 lines (85 loc) · 2.47 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
apply plugin: 'java'
println "Protex Version: $protexVersion"
version = protexVersion
ext.uploadDefs = new File("${rootDir}/uploadArtifacts.gradle")
subprojects {
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'eclipse'
group = 'com.blackducksoftware.protex.sdkclient'
version = protexVersion
sourceCompatibility = 1.6
targetCompatibility = 1.6
ext.wsdlUriVersion = protexWsdlVersion
apply from: "$rootDir/dependencies/core.gradle"
repositories {
maven { url "http://jcenter.bintray.com" }
}
task sourcesJar(type:Jar){
from sourceSets.main.allSource
classifier = 'sources'
}
task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc.destinationDir
classifier = 'javadoc'
}
jar {
from "${rootDir}/LICENSE.txt"
}
artifacts {
archives sourcesJar
archives javadocJar
}
eclipse {
classpath {
defaultOutputDir = file('build/classes/main')
containers = [ 'org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6' ]
}
}
if (uploadDefs.exists()){
apply from: uploadDefs.canonicalPath
}else{
uploadArchives {
repositories{
mavenDeployer {
repository(url: mavenLocal().url)
pom.project {
organization {
name 'Black Duck Software'
url 'http://www.blackducksoftware.com/'
}
licenses {
license {
name 'GNU Lesser General Public License v2.1 only'
url 'http://www.gnu.org/licenses/old-licenses/lgpl-2.1-standalone.html'
}
}
}
}
}
}
}
}
configurations{
distribution
}
task distributionZip(type: Zip){
baseName = 'Protex-SDK-Client-Tools'
into("lib"){
from project(':sdk-client-tools-protex:protex-sdk-examples').configurations.runtime
from project(':sdk-client-tools-protex:protex-sdk-utilities').sourcesJar
from project(':sdk-client-tools-protex:protex-sdk-client').sourcesJar
}
into("examples"){
from project(':sdk-client-tools-protex:protex-sdk-examples').sourceSets.main.java
}
into("wsdl"){
from project(':sdk-client-tools-protex:protex-sdk-client').file("src/main/config/wsdl")
//TODO for some reason this fails to find WSDL files - using manual method for now
//from project(':sdk-client-tools-protex:protex-sdk-client').sourceSets.main.java.srcDirs
}
}
artifacts{
distribution distributionZip
}
task wrapper(type: Wrapper) { gradleVersion = '2.5' }