Update gradle OP-174

This commit is contained in:
2022-03-28 12:22:14 +00:00
parent 00f6417c5e
commit 53b6f2d930
7 changed files with 220 additions and 51 deletions
+126 -44
View File
@@ -1,58 +1,140 @@
buildscript {
repositories {
jcenter()
maven{
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.7'
//classpath 'org.asciidoctor:asciidoctorj-epub3:1.5.0-alpha.6'
classpath ('org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.16') {
exclude group: 'org.jruby'
}
classpath 'org.jruby:jruby:9.1.17.0'
}
plugins {
id 'application'
id 'jacoco'
id "org.sonarqube" version "3.3"
id 'org.asciidoctor.jvm.pdf' version '3.3.0'
id 'org.asciidoctor.jvm.gems' version '3.3.0'
id 'maven-publish'
}
apply plugin: 'org.asciidoctor.convert'
apply plugin: 'java'
apply plugin: 'project-report'
repositories {
repositories {
jcenter()
ruby.gems()
mavenLocal()
mavenCentral()
maven {
url "https://gitlab.thpeetz.de/api/v4/packages/maven"
name "GitLab"
}
}
asciidoctorj {
version = '1.6.0-alpha.7'
dependencies {
asciidoctorGems 'rubygems:rouge:3.15.0'
implementation 'org.slf4j:slf4j-api:1.7.22'
testImplementation 'org.mockito:mockito-all:1.9.5'
testImplementation("org.junit.jupiter:junit-jupiter:5.8.2")
implementation 'ch.qos.logback:logback-core:1.1.2'
implementation 'ch.qos.logback:logback-classic:1.1.2'
}
group 'com.ibtp.versabundus'
description = 'Project Versabundus: Implementierung von Rolit in Java'
version = '0.0.1-SNAPSHOT'
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 MAIN_CLASS_NAME = 'com.thpeetz.versabundus.VersabundusApp'
group = 'de.thpeetz.versabundus'
sourceCompatibility = 1.8
asciidoctor {
//backends 'html5', 'pdf', 'epub3', 'docbook'
backends 'html5', 'pdf'
attributes 'build-gradle': file('build.gradle'),
'source-highlighter': 'coderay',
'toc': 'left',
'toc-title': 'Inhaltsverzeichnis',
'revdate': BUILD_DATE,
'revnumber': version,
'idprefix': 'id_',
'chapter-label': '',
'icons': 'font',
'setanchors': '',
'idseparator': '-',
'endpoint-url': 'http://www.ingenieurbuero-peetz.de',
'imagesdir': './images',
'docinfo1': ''
application {
mainClassName = MAIN_CLASS_NAME
}
jar {
manifest {
attributes('Implementation-Title': 'Versabundus Application', 'Implementation-Version': version, 'Main-Class': MAIN_CLASS_NAME)
}
}
tasks.named('test') {
useJUnitPlatform()
}
jacocoTestReport {
reports {
xml.enabled true
}
}
test.finalizedBy jacocoTestReport
sonarqube {
properties {
// property "sonar.projectKey", "kontor_kontor-java_AX-dd-w3rXuu6JVRvr_g"
property "sonar.host.url", "https://sonar.thpeetz.de"
// property "sonar.login", "d39622f640a91f501b1e8a73d7d78c4fc412fc98"
property "sonar.qualitygate.wait", true
property "sonar.sourceEncoding", "UTF-8"
}
}
tasks.named('sonarqube').configure {
dependsOn test
}
//tasks.withType(Checkstyle) {
// ignoreFailures = true
// showViolations = false
// configFile = rootProject.file("config/checkstyle/checkstyle.xml")
// reports {
// xml.enabled true
// }
//}
//tasks.withType(FindBugs) {
// ignoreFailures = true
// reports {
// xml.enabled true
// }
//}
//pmd {
// ignoreFailures = true
//}
asciidoctorPdf {
dependsOn asciidoctorGemsPrepare
baseDirFollowsSourceFile()
asciidoctorj {
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': '1.0.0',
'revremark': 'Entwurf',
'chapter-label': '',
'icons': 'font',
'idprefix': 'id_',
'idseparator': '-',
'docinfo1': ''
}
}
task asciidoctor(dependsOn: asciidoctorPdf)
build.dependsOn(['asciidoctor'])
wrapper {
gradleVersion = "5.2"
gradleVersion = "6.3"
}