Files
spring-ldap/build.gradle
Josh Cummings 535e986814 Add JavaFormat Checkstyle to Build
Issue gh-744
2023-05-10 09:43:30 -06:00

92 lines
2.8 KiB
Groovy

buildscript {
repositories {
gradlePluginPortal()
maven {
url = 'https://repo.spring.io/plugins-release'
if (project.hasProperty('artifactoryUsername')) {
credentials {
username "$artifactoryUsername"
password "$artifactoryPassword"
}
}
}
}
dependencies {
classpath "com.github.ben-manes:gradle-versions-plugin:0.36.0"
classpath("io.spring.gradle:spring-io-plugin:0.0.8.RELEASE")
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.28.2"
classpath 'org.hidetake:gradle-ssh-plugin:2.10.1'
classpath 'io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.30.0'
classpath "io.spring.javaformat:spring-javaformat-gradle-plugin:$springJavaformatVersion"
}
}
apply plugin: 'io.spring.convention.root'
apply plugin: 'io.spring.convention.docs'
apply plugin: 'io.spring.javaformat'
apply plugin: 's101'
group = "org.springframework.ldap"
description = "Spring LDAP"
ext.coreModules = subprojects.findAll { p-> (!p.name.contains("test") && !p.name.contains("sample") && !p.name.contains("sandbox")) || p.name.contains("spring-ldap-test") }
configure(subprojects - coreModules) {
tasks.findByPath("publishArtifacts")?.enabled = false
}
nohttp {
allowlistFile = project.file("etc/nohttp/allowlist.lines")
source.exclude "buildSrc/build/**"
}
asciidoctor {
outputDir = new File("$buildDir/docs")
attributes([
copycss : '',
icons : 'font',
'source-highlighter': 'prettify',
sectanchors : '',
toc2: '',
idprefix: '',
idseparator: '-',
doctype: 'book',
numbered: '',
'spring-ldap-version' : project.version,
revnumber : project.version
])
options = [
eruby: 'erubis'
]
}
s101 {
configurationDirectory = project.file("etc/s101")
}
allprojects {
if (!['spring-ldap-bom', 'spring-security-docs'].contains(project.name)) {
apply plugin: 'io.spring.javaformat'
apply plugin: 'checkstyle'
pluginManager.withPlugin("io.spring.convention.checkstyle", { plugin ->
configure(plugin) {
dependencies {
checkstyle "io.spring.javaformat:spring-javaformat-checkstyle:$springJavaformatVersion"
}
checkstyle {
toolVersion = '8.34'
}
}
})
if (project.name.contains('sample')) {
tasks.whenTaskAdded { task ->
if (task.name.contains('format') || task.name.contains('checkFormat') || task.name.contains('checkstyle')) {
task.enabled = false
}
}
}
}
}