Skip to content

Commit

Permalink
Infrastructure upgrades
Browse files Browse the repository at this point in the history
  • Loading branch information
ndw committed Apr 14, 2024
1 parent 97efc6d commit 741bf36
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 110 deletions.
100 changes: 2 additions & 98 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ task make_etc() {

["steps", "step-file", "step-os", "step-paged-media",
"step-run", "step-text", "step-mail", "step-rdf", "step-validation",
"step-ixml" ].each { spec ->
].each { spec ->
Task t = task "copy_${spec}_build"(dependsOn: [ "buildspecs" ], type: Copy) {
from "$spec/build/"
exclude "xinclude.xml", "examples/**", "graphics/**", "glossary.xml"
Expand Down Expand Up @@ -163,7 +163,7 @@ task spec_rng(type: JavaExec) {
outputs.file "build/schema/dbspec.rng"

classpath = configurations.tools
main = 'com.thaiopensource.relaxng.translate.Driver'
mainClass = 'com.thaiopensource.relaxng.translate.Driver'
args = ["schema/dbspec.rnc", "build/schema/dbspec.rng"]
}
spec_rng.doFirst {
Expand Down Expand Up @@ -445,51 +445,6 @@ task step_run_src(dependsOn: ["step-run:source"], type: Copy) {
rename ("source.xml", "specification.xml")
}

// ======================================================================
// step-ixml

task step_ixml(type: DocBookTask,
dependsOn: [ "download_xproc_toc",
"steps", "xproc_schemas", "spec_schemas",
"step-ixml:specification",
"step_ixml_assets",
"step_ixml_src" ]) {
inputs.files fileTree(dir: "tools/xsl/")
inputs.files fileTree(dir: "tools/xpl/")
inputs.file "build/xproc/toc.xml"
input("source", "step-ixml/build/source.xml")
output("result", "build/dist/ixml/index.html")

param("schemaext.schema", file("build/schema/dbspec.rng"))
param("ci", getenv("CIWORKFLOW"))
param("ci-commit", getenv("CI_SHA1"))
param("ci-build-number", getenv("CI_BUILD_NUM"))
param("ci-user", getenv("CI_PROJECT_USERNAME"))
param("ci-repo", getenv("CI_PROJECT_REPONAME"))
param("ci-branch", getenv("CI_BRANCH"))
param("ci-tag", getenv("CI_TAG"))

option("style", file("tools/xsl/xproc-specs.xsl"))
option("diff", deltaxml())
option("specid", "ixml")
option("diffloc", buildAbsDir + "/ixml/diff.html")

pipeline "tools/xpl/formatspec.xpl"
}
buildspecs.dependsOn "step_ixml"

task step_ixml_assets(type: Copy) {
from "src/main/resources"
into "build/dist/ixml/"
}

task step_ixml_src(dependsOn: ["step-ixml:source"], type: Copy) {
from "step-ixml/build/"
into "build/dist/ixml/"
include "source.xml"
rename ("source.xml", "specification.xml")
}

// ======================================================================
// step-paged-media

Expand Down Expand Up @@ -698,57 +653,6 @@ task step_mail_xpl(dependsOn: ["step-mail:library"], type: Copy) {
rename ("library.xml", "steps.xpl")
}

// ======================================================================
// step-rdf

task step_rdf(type: DocBookTask,
dependsOn: [ "download_xproc_toc",
"steps", "xproc_schemas", "spec_schemas",
"step-rdf:specification",
"step_rdf_assets",
"step_rdf_src", "step_rdf_xpl" ]) {
inputs.files fileTree(dir: "tools/xsl/")
inputs.files fileTree(dir: "tools/xpl/")
inputs.file "build/xproc/toc.xml"
input("source", "step-rdf/build/source.xml")
output("result", "build/dist/rdf/index.html")

param("schemaext.schema", file("build/schema/dbspec.rng"))
param("ci", getenv("CIWORKFLOW"))
param("ci-commit", getenv("CI_SHA1"))
param("ci-build-number", getenv("CI_BUILD_NUM"))
param("ci-user", getenv("CI_PROJECT_USERNAME"))
param("ci-repo", getenv("CI_PROJECT_REPONAME"))
param("ci-branch", getenv("CI_BRANCH"))
param("ci-tag", getenv("CI_TAG"))

option("style", file("tools/xsl/xproc-specs.xsl"))
option("diff", deltaxml())
option("specid", "rdf")

pipeline "tools/xpl/formatspec.xpl"
}
buildspecs.dependsOn "step_rdf"

task step_rdf_assets(type: Copy) {
from "src/main/resources"
into "build/dist/rdf/"
}

task step_rdf_src(dependsOn: ["step-rdf:source"], type: Copy) {
from "step-rdf/build/"
into "build/dist/rdf/"
include "source.xml"
rename ("source.xml", "specification.xml")
}

task step_rdf_xpl(dependsOn: ["step-rdf:library"], type: Copy) {
from "step-rdf/build/"
into "build/dist/rdf/"
include "library.xml"
rename ("library.xml", "steps.xpl")
}

// ======================================================================
// Clean up

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import org.gradle.api.DefaultTask
import org.gradle.api.tasks.TaskAction
import org.gradle.api.tasks.InputFile
import org.gradle.api.tasks.OutputFile
import org.gradle.api.tasks.incremental.IncrementalTaskInputs

// ================================================================================
// Strip pre-amble and post-amble from examples so that the example on disk
Expand All @@ -20,7 +19,7 @@ class StripAmblesTask extends DefaultTask {
def File output

@TaskAction
void execute(IncrementalTaskInputs inputs) {
void execute() {
def lines = input.readLines()
def firstBlank = -1;
def lastBlank = -1;
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.2.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
include 'steps', 'step-validation', 'step-os', 'step-paged-media', 'step-run',
'step-file', 'step-text', 'step-mail', 'step-json', 'step-rdf', 'step-ixml'
'step-file', 'step-text', 'step-mail'
2 changes: 1 addition & 1 deletion step-file/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ task rng(dependsOn: ["rnc"], type: JavaExec) {
inputs.file "build/steps.rnc"
outputs.file "build/steps.rng"
classpath = configurations.tools
main = 'com.thaiopensource.relaxng.translate.Driver'
mainClass = 'com.thaiopensource.relaxng.translate.Driver'
args = ["build/steps.rnc", "build/steps.rng"]
}

Expand Down
2 changes: 1 addition & 1 deletion step-mail/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ task rng(dependsOn: ["rnc"], type: JavaExec) {
inputs.file "build/steps.rnc"
outputs.file "build/steps.rng"
classpath = configurations.tools
main = 'com.thaiopensource.relaxng.translate.Driver'
mainClass = 'com.thaiopensource.relaxng.translate.Driver'
args = ["build/steps.rnc", "build/steps.rng"]
}

Expand Down
2 changes: 1 addition & 1 deletion step-os/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ task rng(dependsOn: ["rnc"], type: JavaExec) {
inputs.file "build/steps.rnc"
outputs.file "build/steps.rng"
classpath = configurations.tools
main = 'com.thaiopensource.relaxng.translate.Driver'
mainClass = 'com.thaiopensource.relaxng.translate.Driver'
args = ["build/steps.rnc", "build/steps.rng"]
}

Expand Down
2 changes: 1 addition & 1 deletion step-paged-media/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ task rng(dependsOn: ["rnc"], type: JavaExec) {
inputs.file "build/steps.rnc"
outputs.file "build/steps.rng"
classpath = configurations.tools
main = 'com.thaiopensource.relaxng.translate.Driver'
mainClass = 'com.thaiopensource.relaxng.translate.Driver'
args = ["build/steps.rnc", "build/steps.rng"]
}

Expand Down
2 changes: 1 addition & 1 deletion step-rdf/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ task rng(dependsOn: ["rnc"], type: JavaExec) {
inputs.file "build/steps.rnc"
outputs.file "build/steps.rng"
classpath = configurations.tools
main = 'com.thaiopensource.relaxng.translate.Driver'
mainClass = 'com.thaiopensource.relaxng.translate.Driver'
args = ["build/steps.rnc", "build/steps.rng"]
}

Expand Down
2 changes: 1 addition & 1 deletion step-text/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ task rng(dependsOn: ["rnc"], type: JavaExec) {
inputs.file "build/steps.rnc"
outputs.file "build/steps.rng"
classpath = configurations.tools
main = 'com.thaiopensource.relaxng.translate.Driver'
mainClass = 'com.thaiopensource.relaxng.translate.Driver'
args = ["build/steps.rnc", "build/steps.rng"]
}

Expand Down
2 changes: 1 addition & 1 deletion step-validation/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ task rng(dependsOn: ["rnc"], type: JavaExec) {
inputs.file "build/steps.rnc"
outputs.file "build/steps.rng"
classpath = configurations.tools
main = 'com.thaiopensource.relaxng.translate.Driver'
mainClass = 'com.thaiopensource.relaxng.translate.Driver'
args = ["build/steps.rnc", "build/steps.rng"]
}

Expand Down
2 changes: 1 addition & 1 deletion steps/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ task rng(dependsOn: ["rnc"], type: JavaExec) {
inputs.file "build/steps.rnc"
outputs.file "build/steps.rng"
classpath = configurations.tools
main = 'com.thaiopensource.relaxng.translate.Driver'
mainClass = 'com.thaiopensource.relaxng.translate.Driver'
args = ["build/steps.rnc", "build/steps.rng"]
}

Expand Down

0 comments on commit 741bf36

Please sign in to comment.