-
Notifications
You must be signed in to change notification settings - Fork 27
/
build.gradle
144 lines (128 loc) · 3.58 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
buildscript {
repositories { mavenCentral() }
dependencies {
classpath libs.nebula.extra
}
}
plugins {
id 'pmd'
id 'jacoco'
alias libs.plugins.spotbugs
id 'codenarc'
id 'checkstyle'
id 'maven-publish'
id 'signing'
id 'java-library'
alias libs.plugins.nexus.publish
alias libs.plugins.nebula.optional
alias libs.plugins.coveralls
alias libs.plugins.axion.release
}
scmVersion {
tag { prefix = project.name + '-' }
versionCreator 'versionWithBranch'
}
project.group = 'pl.allegro.tech.boot'
project.version = scmVersion.version
allprojects {
repositories {
mavenCentral()
}
apply plugin: 'groovy'
sourceCompatibility = 17
test {
useJUnitPlatform()
}
}
dependencies {
api libs.spring.boot.starter.web
api libs.handlebars.springmvc
api libs.handlebars.guava.cache
api libs.joda.time, optional
api libs.handlebars.helpers, optional
api libs.handlebars.jackson, optional
api libs.spring.boot.configuration.processor, optional
testImplementation libs.bundles.spock
testImplementation libs.spring.boot.starter.test
}
compileJava.dependsOn(processResources)
checkstyle { toolVersion = '10.12.4' }
codenarc {
toolVersion = '3.5.0'
configFile = new File("${projectDir}/config/codenarc/test-rules.groovy")
}
codenarcTest {
ignoreFailures true
compilationClasspath = codenarcMain.compilationClasspath + sourceSets.test.compileClasspath + sourceSets.test.output
}
pmd {
rulesMinimumPriority.set(2)
ruleSets = [
"category/java/bestpractices.xml",
"category/java/codestyle.xml",
"category/java/design.xml",
"category/java/errorprone.xml",
"category/java/performance.xml"
]
}
spotbugsTest {
spotbugsTest.enabled = false
}
jacocoTestReport {
reports {
xml.required = true
html.required = true
}
}
java {
withSourcesJar()
withJavadocJar()
}
publishing {
publications {
sonatype(MavenPublication) {
from components.java
pom {
name = 'Spring Boot Starter Handlebars'
description = 'Spring Boot auto-configuration for Handlebars template engine'
url = 'https://github.com/allegro/handlebars-spring-boot-starter'
inceptionYear = '2015'
licenses {
license {
name = "The Apache License, Version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
developers {
developer {
id = "plesiecki"
name = "Paweł Lesiecki"
}
}
scm {
connection = "scm:svn:http://subversion.example.com/svn/project/trunk/"
developerConnection = "scm:[email protected]:allegro/handlebars-spring-boot-starter.git"
url = "https://github.com/allegro/handlebars-spring-boot-starter"
}
}
}
}
}
nexusPublishing {
repositories {
sonatype {
username = System.getenv("SONATYPE_USERNAME")
password = System.getenv("SONATYPE_PASSWORD")
}
}
}
if (System.getenv("GPG_KEY_ID")) {
signing {
useInMemoryPgpKeys(
System.getenv("GPG_KEY_ID"),
System.getenv("GPG_PRIVATE_KEY"),
System.getenv("GPG_PRIVATE_KEY_PASSWORD")
)
sign publishing.publications
}
}