-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
123 lines (104 loc) · 3.06 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
plugins {
id 'java-library'
id 'eclipse'
id 'com.diffplug.spotless' version '5.17.1'
id 'com.github.spotbugs' version '5.0.14'
id 'groovy' // For Spock
id 'maven-publish'
}
group = 'com.dena.digdag'
version = '0.1.1'
def jdkVersion = '1.8'
sourceCompatibility = jdkVersion
targetCompatibility = jdkVersion
def digdagVersion = '0.10.5'
wrapper {
// Find the latest version at https://gradle.org/releases/
gradleVersion = '8.1'
}
def _licenseHeader = '''\
/*
* SPDX-FileCopyrightText: 2020 DeNA Co., Ltd.
* SPDX-License-Identifier: Apache-2.0
*
* Copyright (c) 2020 DeNA Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'''
spotless {
java {
licenseHeader _licenseHeader
removeUnusedImports()
eclipse().configFile 'eclipse-formatter.xml'
}
}
spotbugs {
toolVersion = '3.1.12'
}
spotbugsMain {
reports {
html {
enabled = true
stylesheet = 'fancy-hist.xsl'
}
}
}
spotbugsTest.enabled = false
repositories {
mavenCentral()
}
def github_user = System.getenv 'github_user'
def github_token = System.getenv 'github_token'
publishing {
publications {
maven(MavenPublication) {
from components.java
}
}
repositories {
maven {
name = 'local'
url "$buildDir/repo"
}
}
}
configurations {
provided
}
sourceSets {
main { compileClasspath += configurations.provided }
test { runtimeClasspath += configurations.provided }
}
dependencies {
provided group: 'io.digdag', name: 'digdag-standards', version: digdagVersion
provided group: 'io.digdag', name: 'digdag-spi', version: digdagVersion
provided group: 'io.digdag', name: 'digdag-plugin-utils', version: digdagVersion
implementation 'com.google.cloud:google-cloud-bigquery:2.27.1'
// Use the latest Groovy version for Spock testing
testImplementation 'org.codehaus.groovy:groovy-all:2.5.8'
// Use the awesome Spock testing and specification framework even with Java
testImplementation 'org.spockframework:spock-core:1.3-groovy-2.5'
testImplementation 'junit:junit:4.12'
// Use digdag test utils
testImplementation group: 'io.digdag', name: 'digdag-core', version: digdagVersion
testImplementation group: 'io.digdag', name: 'digdag-core', version: digdagVersion, classifier: 'tests'
testImplementation group: 'io.digdag', name: 'digdag-client', version: digdagVersion, classifier: 'tests'
}
task debug(type: DebugTask)
class DebugTask extends DefaultTask {
@TaskAction
def debug() {
println System.getenv('gcp_pj')
}
}