Skip to content

Commit

Permalink
converted eXist properties to be gradle compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
thvitt committed Oct 3, 2019
1 parent 673f271 commit 69de1b9
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 7 deletions.
46 changes: 45 additions & 1 deletion build.gradle
@@ -1,3 +1,6 @@
import org.apache.tools.ant.filters.*


plugins {
id 'base'
id 'java'
Expand Down Expand Up @@ -112,7 +115,48 @@ task generateSVGs(type: JavaExec) {
main 'net.faustedition.gen.DiplomaticConversion'
}

assemble.dependsOn generateSVGs, copyWeb, copySource
task xar(type: Zip) {
description "Assembles the eXist app for the search part"
group "Generate HTML"
dependsOn 'src:main:xproc:generateSearch'
dependsOn 'src:main:xproc:testimony'
dependsOn 'src:main:xproc:metadataHtml'
dependsOn 'src:main:xproc:bibliography'
dependsOn copyWeb
archiveFileName = "${existAppName}.xar" // FIXME property
destinationDir = buildDir
from(project.file('src/main/xproc/exist')) {
include "*.xql"
include "*.xqm"
include "*.xconf"
include "build.xml"
include "config/**/*"
}
from(project.file('src/main/xproc/exist')) {
include "*.xml"
exclude "build.xml"
expand(project.properties)
}
from(project.file('src/main/xproc/xslt')) {
include '*.xsl'
include '*.xml'
into 'xslt'
}
from("$buildDir/search") {
include '**/*'
into 'data'
}
from(project.file('src/main/web/content')) {
include '**/*'
into 'data/info'
}
from("$buildDir/www") {
include 'bibliography.html'
into 'data/info'
}
}

assemble.dependsOn generateSVGs, copyWeb, copySource, xar


task showProps { doLast {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Expand Up @@ -5,4 +5,4 @@ upload.url=beta.faustedition.net:/var/www/dev
faust.diplo.allowedFailures=10
faust.diplo.port=0
faust.diplo.debug=0
exist.app-name=faust-dev
existAppName=faust-dev
8 changes: 4 additions & 4 deletions pom.xml
Expand Up @@ -13,7 +13,7 @@
<faust.diplo.server>false</faust.diplo.server> <!-- Run only the web server, don't actually convert -->
<faust.diplo.port>0</faust.diplo.port> <!-- Specify port for server, default to auto -->
<faust.diplo.debug>false</faust.diplo.debug> <!-- Debug phantomjs, produces massive output -->
<exist.app-name>faust-dev</exist.app-name>
<existAppName>faust-dev</existAppName>
</properties>

<repositories>
Expand Down Expand Up @@ -189,7 +189,7 @@
<goals><goal>single</goal></goals>
<configuration>
<descriptor>${basedir}/src/main/assembly/exist-app.xml</descriptor>
<finalName>${exist.app-name}</finalName>
<finalName>${existAppName}</finalName>
<appendAssemblyId>false</appendAssemblyId>
<attach>false</attach>
</configuration>
Expand All @@ -208,8 +208,8 @@
<goals><goal>run</goal></goals>
<configuration>
<target>
<move file="${project.build.directory}/${exist.app-name}.zip"
tofile="${project.build.directory}/${exist.app-name}.xar"/>
<move file="${project.build.directory}/${existAppName}.zip"
tofile="${project.build.directory}/${existAppName}.xar"/>
</target>
</configuration>
</execution>
Expand Down
2 changes: 1 addition & 1 deletion src/main/xproc

0 comments on commit 69de1b9

Please sign in to comment.