mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-05-31 01:02:14 +00:00
Add spring-javaformat plugin
Add spring-javaformat plugin but disable it for all sample projects. Issue gh-8945
This commit is contained in:
parent
9caa39e370
commit
81d9c6cac5
13
build.gradle
13
build.gradle
@ -1,6 +1,7 @@
|
||||
buildscript {
|
||||
dependencies {
|
||||
classpath 'io.spring.gradle:spring-build-conventions:0.0.33.RELEASE'
|
||||
classpath "io.spring.javaformat:spring-javaformat-gradle-plugin:$springJavaformatVersion"
|
||||
classpath "org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion"
|
||||
classpath 'io.spring.nohttp:nohttp-gradle:0.0.5.RELEASE'
|
||||
classpath "io.freefair.gradle:aspectj-plugin:5.0.1"
|
||||
@ -34,12 +35,22 @@ subprojects {
|
||||
plugins.withType(JavaPlugin) {
|
||||
project.sourceCompatibility='1.8'
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile) {
|
||||
options.encoding = "UTF-8"
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
apply plugin: 'io.spring.javaformat'
|
||||
if (project.name.contains('sample')) {
|
||||
tasks.whenTaskAdded { task ->
|
||||
if (task.name.contains('format') || task.name.contains('checkFormat')) {
|
||||
task.enabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nohttp {
|
||||
allowlistFile = project.file("etc/nohttp/allowlist.lines")
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
aspectjVersion=1.9.3
|
||||
gaeVersion=1.9.80
|
||||
springJavaformatVersion=0.0.24
|
||||
springBootVersion=2.4.0-M1
|
||||
version=5.4.0-SNAPSHOT
|
||||
kotlinVersion=1.3.72
|
||||
|
Loading…
x
Reference in New Issue
Block a user