-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
49 lines (43 loc) · 1.19 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
/**
* Used when working with this plugin.
*/
plugins {
id "groovy-gradle-plugin"
id "se.bjurr.gradle.conventional-release" version "0.+"
id "se.bjurr.gradle.update-versions" version "0.+"
id "com.diffplug.spotless" version "6.25.0"
}
/**
* Dependencies needed by the plugin in src/main/groovy
*/
dependencies {
implementation "se.bjurr.violations:violations-lib:1.157.3"
implementation 'com.github.spotbugs.snom:spotbugs-gradle-plugin:6.0.26'
implementation 'se.bjurr.violations:violations-gradle-plugin:3.0.2'
implementation 'com.diffplug.spotless:spotless-plugin-gradle:6.25.0'
}
repositories {
gradlePluginPortal()
mavenCentral()
mavenLocal()
}
sourceCompatibility = 17
targetCompatibility = 17
processResources.dependsOn spotlessApply
spotless {
groovyGradle {
target '*.gradle', '**/*.gradle'
greclipse()
}
}
/**
* Update README with config
*/
def defaultConfig = file('src/main/groovy/se.bjurr.gradle.java-convention.gradle')
.text
.takeBetween('// ---- default config ----')
.stripIndent()
def newReadme = file('README.md')
.text
.replaceAll("(?s)(.*// ---- default config ----).*(// ---- default config ----.*)", "\$1$defaultConfig\$2")
file('README.md').write(newReadme)