Replace to use Gradle build system build the jar
This commit is contained in:
parent
fa74061e49
commit
10aa8f0539
|
@ -0,0 +1,105 @@
|
|||
plugins {
|
||||
id "org.asciidoctor.convert" version "2.3.0"
|
||||
}
|
||||
|
||||
apply plugin: 'java'
|
||||
|
||||
version = '1.0.0'
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
maven { url "https://maven.ossez.com/repository/internal" }
|
||||
}
|
||||
|
||||
ext {
|
||||
environmentProperty = project.hasProperty('environment') ? getProperty('environment') : 'hsql'
|
||||
|
||||
docResourcesVersion = '0.1.0'
|
||||
}
|
||||
|
||||
apply plugin: 'idea'
|
||||
}
|
||||
|
||||
configurations {
|
||||
docs
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile group: 'log4j', name: 'log4j', version: '1.2.9'
|
||||
|
||||
compile group: 'commons-logging', name: 'commons-logging', version: '1.1.1'
|
||||
compile group: 'commons-lang', name: 'commons-lang', version: '2.4'
|
||||
compile group: 'commons-codec', name: 'commons-codec', version: '1.3'
|
||||
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.1.1'
|
||||
|
||||
compile group: 'com.google.guava', name: 'guava', version: '11.0.1'
|
||||
|
||||
compile 'jdom:jdom:1.0'
|
||||
|
||||
testCompile 'junit:junit:3.8.1'
|
||||
|
||||
docs "com.ossez.docresources:ossez-doc-resources:${docResourcesVersion}@zip"
|
||||
}
|
||||
|
||||
task prepareAsciidocBuildZH(type: Sync) {
|
||||
dependsOn configurations.docs
|
||||
// copy doc resources
|
||||
from {
|
||||
configurations.docs.collect { zipTree(it) }
|
||||
}
|
||||
// and doc sources
|
||||
from "src/docs/asciidoc/"
|
||||
// to a build directory of your choice
|
||||
into "$buildDir/asciidoc/assemble"
|
||||
|
||||
}
|
||||
|
||||
task('makePDFZH', type: org.asciidoctor.gradle.AsciidoctorTask){
|
||||
dependsOn prepareAsciidocBuildZH
|
||||
backends 'pdf'
|
||||
sourceDir "$buildDir/asciidoc/assemble"
|
||||
sources {
|
||||
include 'index-single.adoc'
|
||||
}
|
||||
options doctype: 'book', eruby: 'erubis'
|
||||
logDocuments = true
|
||||
attributes 'icons': 'font',
|
||||
'sectanchors': '',
|
||||
'sectnums': '',
|
||||
'toc': '',
|
||||
'source-highlighter' : 'coderay',
|
||||
revnumber: project.version
|
||||
}
|
||||
|
||||
|
||||
|
||||
asciidoctor {
|
||||
dependsOn makePDFZH
|
||||
backends 'html5'
|
||||
sourceDir "$buildDir/asciidoc/assemble"
|
||||
resources {
|
||||
from(sourceDir) {
|
||||
include 'images/*', 'css/**', 'js/**'
|
||||
}
|
||||
}
|
||||
options doctype: 'book', eruby: 'erubis'
|
||||
logDocuments = true
|
||||
attributes 'docinfo': 'shared',
|
||||
// use provided stylesheet
|
||||
stylesdir: "css/",
|
||||
stylesheet: 'ossez.css',
|
||||
'linkcss': true,
|
||||
'icons': 'font',
|
||||
'sectanchors': '',
|
||||
// use provided highlighter
|
||||
'source-highlighter=highlight.js',
|
||||
'highlightjsdir=js/highlight',
|
||||
'highlightjs-theme=atom-one-dark-reasonable',
|
||||
'idprefix': '',
|
||||
'idseparator': '-',
|
||||
'spring-version': project.version,
|
||||
'allow-uri-read': '',
|
||||
revnumber: project.version
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue