
structure.root.main.gradle.mustache Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scaffold-clean-architecture Show documentation
Show all versions of scaffold-clean-architecture Show documentation
Gradle plugin to create a clean application in Java that already works, It follows our best practices!
{{#mutation}}
apply plugin: 'info.solidsoft.pitest.aggregator'
{{/mutation}}
allprojects {
repositories {
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
}
subprojects {
apply plugin: 'java'
apply plugin: 'jacoco'
apply plugin: 'io.spring.dependency-management'
{{#mutation}}
apply plugin: 'info.solidsoft.pitest'
{{/mutation}}
compileJava.dependsOn validateStructure
sourceCompatibility = JavaVersion.{{javaVersion}}
{{#mutation}}
//build.dependsOn 'pitest'
{{/mutation}}
test {
useJUnitPlatform()
}
dependencies {
{{#reactive}}
implementation 'io.projectreactor:reactor-core'
implementation 'io.projectreactor.addons:reactor-extra'
testImplementation 'io.projectreactor.tools:blockhound-junit-platform:{{BLOCK_HOUND_VERSION}}'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
testImplementation 'io.projectreactor:reactor-test'
{{/reactive}}
testImplementation 'org.springframework.boot:spring-boot-starter-test'
{{#lombok}}
compileOnly "org.projectlombok:lombok:${lombokVersion}"
annotationProcessor "org.projectlombok:lombok:${lombokVersion}"
testCompileOnly "org.projectlombok:lombok:${lombokVersion}"
testAnnotationProcessor "org.projectlombok:lombok:${lombokVersion}"
{{/lombok}}
implementation platform("org.springframework.boot:spring-boot-dependencies:${springBootVersion}")
}
{{#reactive}}
tasks.withType(Test).configureEach {
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_13)) {
jvmArgs += [
"-XX:+AllowRedefinitionToAddDeleteMethods"
]
}
}
{{/reactive}}
test.finalizedBy(project.tasks.jacocoTestReport)
{{#mutation}}
pitest {
targetClasses = ['{{package}}.*']
excludedClasses = []
excludedTestClasses = []
verbose = true
outputFormats = ['XML', 'HTML']
threads = 8
exportLineCoverage = true
timestampedReports = false
fileExtensionsToFilter.addAll('xml', 'orbit')
junit5PluginVersion = '1.2.1'
failWhenNoMutations = false
jvmArgs = ["-XX:+AllowRedefinitionToAddDeleteMethods"]
}
{{/mutation}}
jacocoTestReport {
dependsOn test
reports {
xml.setRequired true
xml.setOutputLocation layout.buildDirectory.file("reports/jacoco.xml")
csv.setRequired false
html.setOutputLocation layout.buildDirectory.dir("reports/jacocoHtml")
}
}
}
jacoco {
toolVersion = "${jacocoVersion}"
reportsDirectory.set(layout.buildDirectory.dir("reports"))
}
tasks.register('jacocoMergedReport', JacocoReport) {
dependsOn = [test, subprojects.jacocoTestReport]
additionalSourceDirs.setFrom files(subprojects.sourceSets.main.allSource.srcDirs)
sourceDirectories.setFrom files(subprojects.sourceSets.main.allSource.srcDirs)
classDirectories.setFrom files(subprojects.sourceSets.main.output)
executionData.setFrom project.fileTree(dir: '.', include: '**/build/jacoco/test.exec')
reports {
xml.setRequired true
csv.setRequired false
html.setRequired true
}
}
tasks.withType(JavaCompile).configureEach {
options.compilerArgs = [
'-Amapstruct.suppressGeneratorTimestamp=true'
]
}
tasks.named('wrapper') {
gradleVersion = '{{GRADLE_WRAPPER_VERSION}}'
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy