forked from spring-attic/gradle-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
124 lines (105 loc) · 3.63 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
buildscript {
repositories {
maven { url 'https://repo.springsource.org/plugins-release' }
}
dependencies {
classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:2.2.2'
}
}
allprojects {
apply plugin: 'idea'
apply plugin: 'eclipse'
}
subprojects {
apply plugin: 'groovy'
apply plugin: 'maven'
apply plugin: 'artifactory'
group = 'org.springframework.build.gradle'
repositories {
maven { url 'https://repo.springsource.org/libs-release' }
}
dependencies {
compile gradleApi()
compile localGroovy()
}
}
project(':bundlor-plugin') {
version = bundlorPluginVersion
// dependencies are configured within BundlorPlugin
}
project(':docbook-reference-plugin') {
version = docbookPluginVersion
dependencies {
compile 'net.sf.docbook:docbook-xsl:1.75.2:resources@zip'
compile 'net.sf.docbook:docbook-xml:5.0:xsd-resources@zip'
compile 'net.sf.docbook:docbook-xsl-saxon:1.0.0'
compile 'org.apache.xerces:resolver:2.9.1'
compile 'org.apache.xerces:xercesImpl:2.9.1'
compile 'saxon:saxon:6.5.3'
compile 'net.sf.xslthl:xslthl:2.0.1'
compile 'org.apache.xmlgraphics:fop:0.95-1@jar'
compile 'org.apache.xmlgraphics:xmlgraphics-commons:1.3'
compile 'org.apache.xmlgraphics:batik-bridge:1.7@jar'
compile 'org.apache.xmlgraphics:batik-util:1.7@jar'
compile 'org.apache.xmlgraphics:batik-css:1.7@jar'
compile 'org.apache.xmlgraphics:batik-dom:1.7'
compile 'org.apache.xmlgraphics:batik-svg-dom:1.7@jar'
compile 'org.apache.avalon.framework:avalon-framework-api:4.3.1'
}
task copyDocbookResources {
outputs.dir "${project.buildDir}/docbook"
doLast() {
def docbookZip = configurations.compile.files.find { file -> file.name.contains('docbook-xsl-')};
copy { // copy all images and highlighting files from docbook dist
from zipTree(docbookZip)
include 'docbook/images/**'
include 'docbook/highlighting/**'
into project.buildDir
}
copy { // copy docbook resources from src/main
from 'src/main/docbook'
into "${project.buildDir}/docbook"
}
}
}
task docbookResourcesZip(type: Zip, dependsOn: copyDocbookResources) {
from copyDocbookResources.outputs.files
destinationDir = new File(project.sourceSets.main.output.classesDir, "META-INF")
archiveName = 'docbook-resources.zip'
}
jar.dependsOn docbookResourcesZip
}
ext.repoUser = project.properties['REPO_USERNAME']
ext.repoPass = project.properties['REPO_PASSWORD']
gradle.taskGraph.whenReady {taskGraph ->
if (taskGraph.hasTask(':docbook-reference-plugin:artifactoryPublish') &&
(repoUser == null || repoPass == null)) {
logger.warn("WARNING: artifactoryPublish task specified but REPO_USERNAME " +
"and REPO_PASSWORD properties have not been provided. Authorization may fail.")
}
}
artifactory {
contextUrl = 'https://repo.springsource.org'
publish {
repository {
repoKey = 'plugins-snapshot-local'
username = repoUser
password = repoPass
}
defaults {
publishConfigs('archives')
}
}
resolve {
repository {
repoKey = 'libs-releases'
username = repoUser
password = repoPass
maven = true
}
}
}
task wrapper(type: Wrapper) {
description = 'Generates gradlew[.bat] scripts'
gradleVersion = '1.8'
}