Files
kalorienmanager/docs/build.gradle
T

75 lines
2.1 KiB
Groovy

plugins {
id 'org.asciidoctor.jvm.pdf' version '3.3.2'
id 'org.asciidoctor.jvm.convert' version '3.3.2'
id 'org.asciidoctor.jvm.gems' version '3.3.2'
id 'maven-publish'
}
repositories {
jcenter()
ruby.gems()
}
dependencies {
asciidoctorGems 'rubygems:rouge:3.15.0'
asciidoctorGems 'rubygems:asciidoctor-diagram:2.2.2'
}
final BUILD_DATE = new Date().format('dd.MM.yyyy').toString()
def pdfFile = layout.buildDirectory.file("docs/asciidocPdf/" + project.name + ".pdf")
def pdfArtifact = artifacts.add('archives', pdfFile.get().asFile) {
type 'pdf'
builtBy asciidoctorPdf
}
publishing {
publications {
maven(MavenPublication) {
artifactId = project.name
artifact pdfArtifact
}
}
repositories {
maven {
url "https://gitlab.thpeetz.de/api/v4/projects/${projectId}/packages/maven"
credentials(HttpHeaderCredentials) {
name = "Private-Token"
value = gitLabPrivateToken
}
authentication {
header(HttpHeaderAuthentication)
}
}
}
}
asciidoctorPdf {
dependsOn asciidoctorGemsPrepare
baseDirFollowsSourceFile()
asciidoctorj {
requires 'rouge', 'asciidoctor-diagram'
attributes 'build-gradle': file('build.gradle'),
'endpoint-url': 'https://www.thpeetz.de',
'source-highlighter': 'rouge',
'imagesoutdir': "$buildDir/asciidoc/pdf/images",
'imagesdir': "$buildDir/asciidoc/pdf/images",
'toc': 'left',
'toc-title': 'Inhaltsverzeichnis',
'revdate': BUILD_DATE,
'revnumber': { project.version.toString() },
'revremark': 'Entwurf',
'chapter-label': '',
'icons': 'font',
'idprefix': 'id_',
'idseparator': '-',
'docinfo1': ''
}
}
wrapper {
gradleVersion = "6.3"
}