91 lines
2.3 KiB
Groovy
91 lines
2.3 KiB
Groovy
plugins {
|
|
id 'org.asciidoctor.jvm.pdf' version '3.3.0'
|
|
id 'org.asciidoctor.jvm.gems' version '3.3.0'
|
|
id 'java'
|
|
id 'maven-publish'
|
|
}
|
|
|
|
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'
|
|
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()
|
|
|
|
jar {
|
|
manifest {
|
|
attributes 'Implementation-Title': 'Generations', 'Implementation-Version': version
|
|
}
|
|
}
|
|
|
|
java {
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
|
}
|
|
|
|
asciidoctorPdf {
|
|
dependsOn asciidoctorGemsPrepare
|
|
baseDirFollowsSourceFile()
|
|
|
|
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)
|
|
build.dependsOn(['asciidoctor'])
|
|
|
|
wrapper {
|
|
gradleVersion = "6.3"
|
|
}
|