-
Notifications
You must be signed in to change notification settings - Fork 16
/
build.gradle
75 lines (64 loc) · 1.85 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
import com.github.spotbugs.snom.Confidence
import com.github.spotbugs.snom.Effort
import org.eclipse.jgit.api.errors.RefAlreadyExistsException
buildscript {
if (!project.hasProperty("springBootVersion")) {
ext.springBootVersion = System.getenv("SPRING_BOOT_VERSION") ?: "3.3.1"
}
dependencies {
classpath "com.avast.gradle:gradle-docker-compose-plugin:0.17.10"
}
}
plugins {
id "com.github.spotbugs" version "6.0.+"
id 'org.springframework.boot' version "$springBootVersion" apply false
id "idea"
id 'org.ajoberstar.grgit' version '5.3.0'
id 'io.github.gradle-nexus.publish-plugin' version "2.0.0"
}
idea.project {
vcs = 'Git'
languageLevel = JavaVersion.VERSION_17
targetBytecodeVersion = JavaVersion.VERSION_17
}
idea.module {
downloadJavadoc = false
downloadSources = true
excludeDirs += file('logs')
excludeDirs += file('gradle')
excludeDirs += file('build')
excludeDirs += file('target')
excludeDirs += file('.idea')
excludeDirs += file('.gradle')
excludeDirs += file('logs2')
}
tasks.register('tagRelease') {
doLast {
try {
grgit.tag.add {
name = "v$version"
message = "Release of ${version}"
}
grgit.push(refsOrSpecs: ["v$version"])
}
catch (RefAlreadyExistsException ignored) {
logger.warn("Tag v$version already exists.")
}
}
}
group = "com.transferwise.tasks"
nexusPublishing {
repositories {
sonatype {
username = System.getenv("SONATYPE_USER")
password = System.getenv("SONATYPE_PASSWORD")
}
}
}
tasks.findByName("initializeSonatypeStagingRepository").setOnlyIf {
System.getenv("OSS_SIGNING_KEY")
}
spotbugs {
effort = Effort.valueOf('MAX')
reportLevel = Confidence.valueOf('DEFAULT')
}