Skip to content

Commit

Permalink
Merge pull request #102 from ndw/master
Browse files Browse the repository at this point in the history
Stylesheet, build, and infrastructure improvements
  • Loading branch information
ndw authored Mar 5, 2018
2 parents b6e35fe + 430193b commit ba036ee
Show file tree
Hide file tree
Showing 11 changed files with 288 additions and 236 deletions.
37 changes: 19 additions & 18 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ buildscript {
classpath fileTree(dir: 'lib').include("*.jar")
classpath group: 'com.xmlcalabash', name: 'xmlcalabash1-print', version: '1.1.4'
classpath group: 'com.xmlcalabash', name: 'xmlcalabash', version: xmlCalabashVersion
classpath group: 'com.xmlcalabash', name: 'xmlcalabash1-gradle', version: '1.2.2'
classpath group: 'com.xmlcalabash', name: 'xmlcalabash1-gradle', version: '1.3.2'
classpath group: 'com.xmlcalabash', name: 'xmlcalabash1-deltaxml', version: '1.1.4'
classpath group: 'org.docbook', name: 'docbook-xsl-java-saxon', version: '1.2.1-95'
classpath group: 'org.docbook', name: 'docbook-schemas', version: '5.1-1'
}
}

Expand Down Expand Up @@ -58,7 +59,9 @@ dependencies {
[group: 'com.thaiopensource', name: 'jing', version: '20091111', transitive: false],
[group: 'org.docbook', name: 'docbook-xsl-java-saxon', version: '1.2.1-95'],
[group: 'com.xmlcalabash', name: 'xmlcalabash', version: xmlCalabashVersion],
// 1.2 because that's what gradleApi requires :-(
[group: 'com.xmlcalabash', name: 'xmlcalabash1-gradle', version: '1.3.2'],

// 1.2 because that's what gradleApi requires :-(
[group: 'commons-cli', name: 'commons-cli', version: '1.2']
)

Expand Down Expand Up @@ -341,9 +344,7 @@ task stageZip(type: Copy, dependsOn: [ "compileXslt", "copyResources" ]) {
}

task relNotes(type: XMLCalabashTask, dependsOn: [ "compileXslt" ]) {
inputs.file "docs/RELEASENOTES.xml"
inputs.file "build/xslt/base/pipelines/docbook.xpl"
outputs.file "build/stage/zip/docs/RELEASENOTES.html"
option("schema", "https://docbook.org/xml/5.1/rng/docbook.rng")
param("resource.root", "https://cdn.docbook.org/latest/")
input("source", "docs/RELEASENOTES.xml")
output("result", "build/stage/zip/docs/RELEASENOTES.html")
Expand Down Expand Up @@ -477,11 +478,6 @@ jar {
}
}

/* I'm not sure this is worth maintaining. I'm going to remove it
and see if anyone notices. The problem is that it would have
to ship with different versions of Saxon and XML Calabash.
It's not unmanagable, but it's hard to manage.
// ======================================================================
// Make JAR ZIP distribution

Expand Down Expand Up @@ -510,7 +506,6 @@ task jarZip(type: Zip, dependsOn: [ "stageJarZip" ]) {
into 'docbook-xslt2-' + version
archiveName 'docbook-xslt2-' + version + "-" + saxonBranch + "-jar.zip"
}
*/

// ======================================================================
// Make dist
Expand All @@ -530,15 +525,21 @@ signing {
sign configurations.archives
}

/*
uploadArchives {
repositories {
mavenDeployer {
repository(url: uri('/tmp/repo'))
}
publishing {
publications {
mavenJava(MavenPublication) {
groupId group
artifactId 'docbook-xslt2'
version version
from components.java
}
}
repositories {
maven {
url 'file://' + new File(System.getProperty('user.home'), '.m2/repository').absolutePath
}
}
}
*/

uploadArchives {
repositories {
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version=2.1.2
version=2.2.0
saxonVersion=9.8.0-8
xmlCalabashVersion=1.1.16-98
xmlCalabashVersion=1.1.18-98

snapshot=
builtBy=Norman Walsh
Expand Down
3 changes: 3 additions & 0 deletions gradletest/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.gradle/
output.xml
output.html
43 changes: 43 additions & 0 deletions gradletest/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
buildscript {
repositories {
maven { url uri('/tmp/repo') }
mavenLocal()
mavenCentral()
maven { url "http://maven.restlet.org" }
}

dependencies {
classpath group: 'org.docbook', name: 'docbook-xslt2', version: '2.2.0'
classpath group: 'org.docbook', name: 'docbook-schemas', version: '5.1-1'
classpath group: 'com.xmlcalabash', name: 'xmlcalabash', version: '1.1.18-98'
classpath group: 'com.xmlcalabash', name: 'xmlcalabash1-gradle', version: '1.3.2'
classpath group: 'org.xmlresolver', name: 'xmlresolver', version: '0.13.1'
}
}

repositories {
mavenLocal()
mavenCentral()
}

import org.docbook.DocBookTask
import com.xmlcalabash.XMLCalabashTask

task helloWorld() {
doFirst {
println("Hello, world.")
}
}

task testTask(type: XMLCalabashTask) {
input("source", "input.xml")
output("result", "output.xml")
pipeline("pipeline.xpl")
}

task testDocBook(type: DocBookTask) {
debug = true
uriResolver = "org.xmlresolver.Resolver"
input("source", "input.xml")
output("result", "output.html")
}
7 changes: 7 additions & 0 deletions gradletest/input.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<article xmlns="http://docbook.org/ns/docbook"
version="5.0">
<info>
<title>Test Article</title>
</info>
<para>This is a test.</para>
</article>
8 changes: 8 additions & 0 deletions gradletest/pipeline.xpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
version="1.0">
<p:input port="source"/>
<p:output port="result"/>

<p:identity/>
</p:declare-step>
Loading

0 comments on commit ba036ee

Please sign in to comment.