2019-09-12 17:08:03 -04:00
|
|
|
plugins {
|
2019-09-13 10:22:08 -04:00
|
|
|
id 'maven-publish'
|
2019-09-12 17:08:03 -04:00
|
|
|
id "org.asciidoctor.convert" version "2.3.0"
|
|
|
|
}
|
|
|
|
|
|
|
|
apply plugin: 'java'
|
|
|
|
|
2019-09-13 10:26:57 -04:00
|
|
|
group = 'com.ossez.rets-io'
|
2019-10-18 15:15:59 -04:00
|
|
|
version = '0.1.1-SNAPSHOT'
|
2019-09-12 17:08:03 -04:00
|
|
|
|
2019-10-07 00:59:25 -04:00
|
|
|
sourceCompatibility = 1.8
|
|
|
|
targetCompatibility = 1.8
|
|
|
|
|
2019-09-12 17:08:03 -04:00
|
|
|
allprojects {
|
|
|
|
repositories {
|
|
|
|
maven { url "https://maven.ossez.com/repository/internal" }
|
2019-09-13 10:22:08 -04:00
|
|
|
mavenLocal()
|
2019-09-12 17:08:03 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
ext {
|
|
|
|
environmentProperty = project.hasProperty('environment') ? getProperty('environment') : 'hsql'
|
|
|
|
|
|
|
|
docResourcesVersion = '0.1.0'
|
|
|
|
}
|
|
|
|
|
|
|
|
apply plugin: 'idea'
|
|
|
|
}
|
|
|
|
|
|
|
|
configurations {
|
|
|
|
docs
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2019-09-24 22:46:50 -04:00
|
|
|
// LOG
|
2019-10-04 17:30:11 -04:00
|
|
|
compile 'ch.qos.logback:logback-classic:1.2.3'
|
2019-09-12 17:08:03 -04:00
|
|
|
|
2019-09-23 07:41:17 -04:00
|
|
|
// APACHE
|
2019-09-22 23:20:09 -04:00
|
|
|
compile group: 'commons-io', name: 'commons-io', version: '2.6'
|
2019-09-12 17:08:03 -04:00
|
|
|
compile group: 'commons-codec', name: 'commons-codec', version: '1.3'
|
2019-09-23 07:41:17 -04:00
|
|
|
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.9'
|
|
|
|
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.6'
|
2019-09-12 17:08:03 -04:00
|
|
|
|
2019-09-23 07:41:17 -04:00
|
|
|
// GOOGLE
|
2019-09-22 13:16:22 -04:00
|
|
|
compile group: 'com.google.guava', name: 'guava', version: '28.1-jre'
|
2019-09-12 17:08:03 -04:00
|
|
|
|
2019-09-22 10:10:55 -04:00
|
|
|
// XML
|
2019-09-22 23:20:09 -04:00
|
|
|
compile group: 'org.dom4j', name: 'dom4j', version: '2.1.1'
|
2019-09-24 22:46:50 -04:00
|
|
|
compile group: 'org.springframework.boot', name: 'spring-boot', version: '2.1.8.RELEASE'
|
|
|
|
|
2019-09-12 17:08:03 -04:00
|
|
|
|
2019-09-22 10:10:55 -04:00
|
|
|
// TEST
|
|
|
|
testCompile group: 'junit', name: 'junit', version: '4.12'
|
2019-09-12 17:08:03 -04:00
|
|
|
|
2019-09-22 10:10:55 -04:00
|
|
|
// DOCS
|
2019-09-12 17:08:03 -04:00
|
|
|
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"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2019-09-13 10:22:08 -04:00
|
|
|
task('makePDFZH', type: org.asciidoctor.gradle.AsciidoctorTask) {
|
2019-09-12 17:08:03 -04:00
|
|
|
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': '',
|
2019-09-13 10:22:08 -04:00
|
|
|
'source-highlighter': 'coderay',
|
2019-09-12 17:08:03 -04:00
|
|
|
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
|
|
|
|
}
|
2019-09-13 10:22:08 -04:00
|
|
|
task sourcesJar(type: Jar) {
|
|
|
|
from sourceSets.main.allJava
|
|
|
|
archiveClassifier = 'sources'
|
|
|
|
}
|
2019-09-12 17:08:03 -04:00
|
|
|
|
2019-09-13 10:22:08 -04:00
|
|
|
task javadocJar(type: Jar) {
|
|
|
|
from javadoc
|
|
|
|
archiveClassifier = 'javadoc'
|
|
|
|
}
|
2019-09-12 17:08:03 -04:00
|
|
|
|
2019-09-13 10:22:08 -04:00
|
|
|
publishing {
|
|
|
|
publications {
|
|
|
|
maven(MavenPublication) {
|
|
|
|
from components.java
|
|
|
|
artifact sourcesJar
|
|
|
|
artifact javadocJar
|
|
|
|
}
|
|
|
|
}
|
2019-10-18 15:15:59 -04:00
|
|
|
repositories {
|
|
|
|
maven {
|
|
|
|
credentials {
|
|
|
|
username 'publish'
|
|
|
|
password 'apk2OJbXCMmwQz1K'
|
|
|
|
}
|
|
|
|
|
|
|
|
def releasesRepoUrl = "https://maven.ossez.com/repository/internal"
|
|
|
|
def snapshotsRepoUrl = "https://maven.ossez.com/repository/snapshots/"
|
|
|
|
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
|
|
|
|
}
|
|
|
|
}
|
2019-09-13 10:22:08 -04:00
|
|
|
}
|