Skip to content

Commit

Permalink
Add reference docs tasks to Gradle build
Browse files Browse the repository at this point in the history
- Move spring-webflow-reference to src/reference
- Upgrade to Docbook 5
- Apply docbook plugin
- Add tasks for generating distribution zip files
  • Loading branch information
rstoyanchev committed May 25, 2012
1 parent 4e81930 commit 50a1cf1
Show file tree
Hide file tree
Showing 37 changed files with 185 additions and 265 deletions.
100 changes: 100 additions & 0 deletions build.gradle
Expand Up @@ -234,6 +234,12 @@ configure(rootProject) {

description = 'Spring Web Flow'

apply plugin: 'docbook-reference'

reference {
sourceDir = file('src/reference')
}

// don't publish the default jar for the root project
configurations.archives.artifacts.clear()

Expand All @@ -258,9 +264,103 @@ configure(rootProject) {
maxMemory = '1024m'
}

task docsZip(type: Zip) {
group = 'Distribution'
classifier = 'docs'
description = "Builds -${classifier} archive containing api and reference " +
"for deployment at static.springframework.org/spring-webflow/docs."

from('src/dist') {
include 'changelog.txt'
}

from (api) {
into 'api'
}

from (reference) {
into 'reference'
}
}

task schemaZip(type: Zip) {
group = 'Distribution'
classifier = 'schema'
description = "Builds -${classifier} archive containing all " +
"XSDs for deployment at static.springframework.org/schema."

subprojects.each { subproject ->
def Properties schemas = new Properties();

subproject.sourceSets.main.resources.find {
it.path.endsWith('META-INF/spring.schemas')
}?.withInputStream { schemas.load(it) }

for (def key : schemas.keySet()) {
def shortName = key.replaceAll(/http.*schema.(.*).spring-.*/, '$1')
assert shortName != key
File xsdFile = subproject.sourceSets.main.allSource.find {
it.path.endsWith(schemas.get(key))
}
assert xsdFile != null
into (shortName) {
from xsdFile.path
}
}
}
}

task distZip(type: Zip, dependsOn: [docsZip, schemaZip]) {
group = 'Distribution'
classifier = 'dist'
description = "Builds -${classifier} archive, containing all jars and docs, " +
"suitable for community download page."

def baseDir = "${project.name}-${project.version}";

from('src/dist') {
include 'notice.txt'
into "${baseDir}"
expand(copyright: new Date().format('yyyy'), version: project.version)
}

from('src/dist') {
include 'readme.txt'
include 'license.txt'
into "${baseDir}"
}

from(zipTree(docsZip.archivePath)) {
into "${baseDir}/docs"
}

from(zipTree(schemaZip.archivePath)) {
into "${baseDir}/schema"
}

subprojects.each { subproject ->
into ("${baseDir}/libs") {
from subproject.jar
if (subproject.tasks.findByPath('sourcesJar')) {
from subproject.sourcesJar
}
if (subproject.tasks.findByPath('javadocJar')) {
from subproject.javadocJar
}
}
}
}

artifacts {
archives docsZip
archives schemaZip
archives distZip
}

task wrapper(type: Wrapper) {
description = 'Generates gradlew[.bat] scripts'
gradleVersion = '1.0-rc-1'
}

}

9 changes: 0 additions & 9 deletions spring-binding/build.xml

This file was deleted.

9 changes: 0 additions & 9 deletions spring-faces/build.xml

This file was deleted.

10 changes: 0 additions & 10 deletions spring-js-resources/build.xml

This file was deleted.

9 changes: 0 additions & 9 deletions spring-js/build.xml

This file was deleted.

15 changes: 0 additions & 15 deletions spring-webflow-library/.project

This file was deleted.

13 changes: 0 additions & 13 deletions spring-webflow-library/build.xml

This file was deleted.

10 changes: 0 additions & 10 deletions spring-webflow-library/org.springframework.webflow-library.libd

This file was deleted.

11 changes: 0 additions & 11 deletions spring-webflow-reference/.project

This file was deleted.

8 changes: 0 additions & 8 deletions spring-webflow-reference/build.xml

This file was deleted.

35 changes: 0 additions & 35 deletions spring-webflow-reference/css/html/highlight.css

This file was deleted.

59 changes: 0 additions & 59 deletions spring-webflow-reference/css/html/stylesheet.css

This file was deleted.

9 changes: 0 additions & 9 deletions spring-webflow/build.xml

This file was deleted.

@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="actions">
<chapter xmlns="http://docbook.org/ns/docbook" version="5.0"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="actions">
<title>Executing actions</title>
<sect1 id="actions-introduction">
<title>Introduction</title>
Expand Down Expand Up @@ -463,4 +464,4 @@ public class FileUploadHandler {
</para>
</sect2>
</sect1>
</chapter>
</chapter>
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="defining-flows">
<chapter xmlns="http://docbook.org/ns/docbook" version="5.0"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="defining-flows">
<title>Defining Flows</title>
<sect1 id="defining-flows-introduction">
<title>Introduction</title>
Expand Down Expand Up @@ -493,4 +494,4 @@ public interface FlowOutcome {
</para>
</sect2>
</sect1>
</chapter>
</chapter>
9 changes: 5 additions & 4 deletions spring-webflow-reference/src/el.xml → src/reference/el.xml
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="el">
<chapter xmlns="http://docbook.org/ns/docbook" version="5.0"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="el">
<title>Expression Language (EL)</title>
<sect1 id="el-introduction">
<title>Introduction</title>
Expand Down Expand Up @@ -370,4 +371,4 @@
If no such variable is found, an <code>EvaluationException</code> will be thrown.
</para>
</sect1>
</chapter>
</chapter>
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<appendix id="field-mappings">
<appendix xmlns="http://docbook.org/ns/docbook" version="5.0"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="field-mappings">
<title>Flow Definition Language 1.0 to 2.0 Mappings</title>
<para>
The flow definition language has changed since the 1.0 release.
Expand Down

0 comments on commit 50a1cf1

Please sign in to comment.