-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
48 lines (43 loc) · 901 Bytes
/
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
buildscript {
repositories {
mavenCentral()
}
}
plugins {
id 'com.diffplug.spotless' version '6.23.3'
}
static def readPythonLicense(licenseName) {
File licenseFile = new File('licenses/' + licenseName + '.txt')
def line
def s = '#\n'
licenseFile.withReader { reader ->
while ((line = reader.readLine()) != null) {
s += '#'
if(!line.isEmpty()) {
s += ' '
s += line
}
s += '\n'
}
}
s += '#'
return s
}
spotless {
def blackVersion = '23.12.1'
def greclipseVersion = '4.26' // version 4.26 seems to be the latest compatible with Java 11
ratchetFrom 'origin/main'
apply plugin: 'groovy'
groovyGradle {
target '*.gradle' // default target of groovyGradle
greclipse(greclipseVersion)
}
python {
target 'python/**/*.py'
black(blackVersion)
licenseHeader readPythonLicense('APACHE_2_0_DYNATRACE'), '(import|from)'
}
}
repositories {
mavenCentral()
}