127 lines
3.5 KiB
Groovy
127 lines
3.5 KiB
Groovy
plugins {
|
|
id 'application'
|
|
id 'jacoco-report-aggregation'
|
|
id 'maven-publish'
|
|
alias(versions.plugins.javaConvention)
|
|
alias(versions.plugins.sonarqube)
|
|
//alias(versions.plugins.asciidoctorConvention)
|
|
alias(versions.plugins.asciidoctorPdf)
|
|
alias(versions.plugins.asciidoctorConvert)
|
|
alias(versions.plugins.asciidoctorGems)
|
|
}
|
|
|
|
repositories {
|
|
ruby.gems()
|
|
}
|
|
|
|
dependencies {
|
|
asciidoctorGems "rubygems:rouge:3.15.0"
|
|
asciidoctorGems "rubygems:asciidoctor-diagram:2.2.2"
|
|
|
|
implementation versions.slf4j
|
|
implementation versions.commonscli
|
|
testImplementation versions.junit
|
|
implementation versions.bundles.logback
|
|
spotbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:1.12.0'
|
|
}
|
|
|
|
def pdfFile = layout.buildDirectory.file("docs/asciidocPdf/" + project.name + ".pdf")
|
|
def pdfArtifact = artifacts.add('archives', pdfFile.get().asFile) {
|
|
type 'pdf'
|
|
builtBy asciidoctorPdf
|
|
}
|
|
|
|
group = 'de.thpeetz'
|
|
|
|
publishing {
|
|
publications {
|
|
docs(MavenPublication) {
|
|
groupId = group + '.docs'
|
|
artifactId = project.name
|
|
artifact pdfArtifact
|
|
}
|
|
application(MavenPublication) {
|
|
groupId = group
|
|
from components.java
|
|
}
|
|
}
|
|
repositories {
|
|
maven {
|
|
def releasesRepoUrl = "https://nexus.thpeetz.de/nexus/content/repositories/releases/"
|
|
def snapshotsRepoUrl = "https://nexus.thpeetz.de/nexus/content/repositories/snapshots/"
|
|
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
|
|
credentials {
|
|
username "thpeetz-buildservice"
|
|
password "w4wrcRtWvS5QcQsn"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
final BUILD_DATE = new Date().format('dd.MM.yyyy').toString()
|
|
|
|
final MAIN_CLASS_NAME = 'com.thpeetz.versabundus.VersabundusApp'
|
|
|
|
java {
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
}
|
|
|
|
application {
|
|
mainClass = MAIN_CLASS_NAME
|
|
}
|
|
|
|
jar {
|
|
manifest {
|
|
attributes('Implementation-Title': 'Versabundus Application', 'Implementation-Version': version, 'Main-Class': MAIN_CLASS_NAME)
|
|
}
|
|
}
|
|
|
|
spotbugs {
|
|
ignoreFailures = true
|
|
}
|
|
|
|
sonarqube {
|
|
properties {
|
|
property "sonar.projectKey", "tpeetz_versabundus_AYB03YW5uGIZKMqU5_es"
|
|
property "sonar.host.url", "https://sonar.thpeetz.de"
|
|
property "sonar.login", "2703febc0e07fc850e5494125c8774a1fe65a90a"
|
|
property "sonar.qualitygate.wait", true
|
|
property "sonar.sourceEncoding", "UTF-8"
|
|
}
|
|
}
|
|
|
|
test.finalizedBy jacocoTestReport
|
|
|
|
tasks.named('sonarqube').configure {
|
|
dependsOn test
|
|
}
|
|
|
|
asciidoctorPdf {
|
|
dependsOn asciidoctorGemsPrepare
|
|
|
|
baseDirFollowsSourceFile()
|
|
|
|
asciidoctorj {
|
|
//requires 'rouge', 'asciidoctor-diagram'
|
|
requires 'rouge'
|
|
attributes 'build-gradle': file('build.gradle'),
|
|
'endpoint-url': 'https://www.thpeetz.de',
|
|
'source-highlighter': 'rouge',
|
|
'imagesdir': './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 = "7.5"
|
|
}
|