-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
55 lines (49 loc) · 1.04 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
plugins {
id 'java'
id 'groovy'
id "com.diffplug.spotless" version "6.25.0"
id 'org.openrewrite.rewrite' version '5.40.6'
id "com.github.jakemarsden.git-hooks" version "0.0.2"
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
repositories {
mavenCentral()
}
dependencies {
rewrite(platform("org.openrewrite.recipe:rewrite-recipe-bom:2.6.3"))
rewrite("org.openrewrite.recipe:rewrite-migrate-java")
rewrite("org.openrewrite.recipe:rewrite-java-security")
}
spotless {
java {
importOrder()
removeUnusedImports()
prettier()
formatAnnotations()
}
groovy {
importOrder()
excludeJava()
greclipse()
}
groovyGradle {
greclipse()
}
}
rewrite {
activeRecipe(
"org.openrewrite.java.security.SecureRandom",
"org.openrewrite.java.security.JavaSecurityBestPractices",
"org.openrewrite.java.migrate.UpgradeToJava17",
"org.openrewrite.java.cleanup.CommonStaticAnalysis",
"org.openrewrite.java.RemoveUnusedImports",
"org.openrewrite.java.cleanup.Cleanup"
)
}
gitHooks {
hooks = ['pre-commit': 'check']
}