Update Asciidoctor build
This commit is contained in:
+66
-25
@@ -1,44 +1,85 @@
|
||||
plugins {
|
||||
id 'org.asciidoctor.jvm.pdf' version '3.1.0'
|
||||
id 'org.asciidoctor.jvm.gems' version '3.1.0'
|
||||
id 'org.asciidoctor.jvm.pdf' version '3.3.0'
|
||||
id 'org.asciidoctor.jvm.gems' version '3.3.0'
|
||||
id 'java'
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
apply plugin: 'java'
|
||||
|
||||
description = 'Introduction to documentation'
|
||||
version = '1.0.0-SNAPSHOT'
|
||||
description = 'Anwendung Generations'
|
||||
group = 'de.thpeetz.generations'
|
||||
|
||||
repositories {
|
||||
jcenter()
|
||||
ruby.gems()
|
||||
maven {
|
||||
url "https://gitlab.thpeetz.de/api/v4/packages/maven"
|
||||
name "GitLab"
|
||||
}
|
||||
}
|
||||
|
||||
build.dependsOn(['asciidoctor'])
|
||||
|
||||
dependencies {
|
||||
asciidoctorGems 'rubygems:rouge:3.15.0'
|
||||
asciidoctorGems 'rubygems:rouge:3.15.0'
|
||||
implementation 'org.slf4j:slf4j-api:1.7.22'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
testImplementation 'org.mockito:mockito-all:1.9.5'
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
library(MavenPublication) {
|
||||
from components.java
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
maven {
|
||||
url "https://gitlab.thpeetz.de/api/v4/projects/27/packages/maven"
|
||||
credentials(HttpHeaderCredentials) {
|
||||
name = "Private-Token"
|
||||
value = gitLabPrivateToken
|
||||
}
|
||||
authentication {
|
||||
header(HttpHeaderAuthentication)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
final BUILD_DATE = new Date().format('dd.MM.yyyy').toString()
|
||||
final DOK_VERSION = version
|
||||
|
||||
jar {
|
||||
manifest {
|
||||
attributes 'Implementation-Title': 'Generations', 'Implementation-Version': version
|
||||
}
|
||||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
asciidoctorPdf {
|
||||
dependsOn asciidoctorGemsPrepare
|
||||
dependsOn asciidoctorGemsPrepare
|
||||
baseDirFollowsSourceFile()
|
||||
|
||||
baseDirFollowsSourceFile()
|
||||
|
||||
asciidoctorj {
|
||||
attributes 'build-gradle': file('build.gradle'),
|
||||
'revdate': BUILD_DATE,
|
||||
'revnumber': DOK_VERSION,
|
||||
'endpoint-url': 'http://www.ingenieurbuero-peetz.de',
|
||||
'imagesdir': './images',
|
||||
'toc-title': 'Inhaltsverzeichnis',
|
||||
'chapter-label': '',
|
||||
'icons': 'font',
|
||||
'idprefix': 'id_',
|
||||
'idseparator': '-',
|
||||
'setanchors': '',
|
||||
'docinfo1': ''
|
||||
}
|
||||
asciidoctorj {
|
||||
requires 'rouge'
|
||||
attributes 'build-gradle': file('build.gradle'),
|
||||
'endpoint-url': 'http://www.thpeetz.de',
|
||||
'source-highlighter': 'rouge',
|
||||
'revdate': BUILD_DATE,
|
||||
'revnumber': '1.0.0',
|
||||
'revremark': 'Entwurf',
|
||||
'imagesdir': './images',
|
||||
'toc': 'left',
|
||||
'toc-title': 'Inhaltsverzeichnis',
|
||||
'chapter-label': '',
|
||||
'icons': 'font',
|
||||
'idprefix': 'id_',
|
||||
'idseparator': '-',
|
||||
'docinfo1': ''
|
||||
}
|
||||
}
|
||||
|
||||
task asciidoctor(dependsOn: asciidoctorPdf)
|
||||
|
||||
Reference in New Issue
Block a user