-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
85 lines (75 loc) · 2.13 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
plugins {
id "com.jfrog.bintray" version "1.3.1"
}
allprojects {
repositories {
jcenter()
}
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'groovy'
}
group 'com.geowarin'
version '0.2.2'
sourceCompatibility = 1.5
repositories {
mavenCentral()
}
dependencies {
compile('javax.servlet:servlet-api:3.0-alpha-1') { ext.optional = true }
compile('org.spockframework:spock-core:1.0-groovy-2.4') { ext.optional = true }
compile('org.springframework:spring-webmvc:4.2.0.RELEASE') { ext.optional = true }
compile('org.springframework:spring-web:4.2.1.RELEASE') { ext.optional = true }
compile('org.springframework:spring-test:4.2.1.RELEASE') { ext.optional = true }
compile('org.codehaus.groovy:groovy-all:2.4.4') { ext.optional = true }
testCompile group: 'junit', name: 'junit', version: '4.11'
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar, javadocJar
}
publishing {
publications {
JarPublication(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
pom.withXml {
def depMap = configurations.compile.dependencies.collectEntries { [it.name, it] }
asNode().dependencies.dependency.findAll {
def dep = depMap.get(it.artifactId.text())
return dep?.hasProperty('optional') && dep.optional
}.each {
if (it.optional) {
it.optional.value = 'true'
} else {
it.appendNode('optional', 'true')
}
}
}
}
}
}
bintray {
user = bintrayUser
key = bintrayKey
publications = ['JarPublication']
pkg {
repo = 'maven'
name = 'spring-spock-mvc'
desc = 'A thin layer over spring-test-mvc to make tests more spock-friendly'
licenses = ['MIT']
vcsUrl = 'https://github.com/geowarin/spring-spock-mvc.git'
version {
name = project.version
desc = 'A thin layer over spring-test-mvc to make tests more spock-friendly'
}
}
}