-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
151 lines (134 loc) · 3.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
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
145
146
147
148
149
150
151
plugins {
id 'java-library'
id 'jvm-test-suite'
id 'maven-publish'
id 'signing'
id 'io.toolebox.git-versioner' version '1.6.5' apply false
id 'com.liferay.maven.plugin.builder' version '2.0.2' apply false
id 'com.diffplug.spotless' version '6.22.0' apply false
}
dependencies {
compileOnly 'javax.jms:javax.jms-api:2.0'
implementation 'org.slf4j:slf4j-api:1.7.36'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.15.3'
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.15.3'
implementation 'commons-beanutils:commons-beanutils:1.9.4'
}
allprojects {
apply plugin: 'java-library'
apply plugin: 'jvm-test-suite'
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: 'com.diffplug.spotless'
apply plugin: 'io.toolebox.git-versioner'
group 'com.testingsyndicate'
repositories {
mavenCentral()
}
java {
withJavadocJar()
withSourcesJar()
}
testing {
suites {
test {
useJUnitJupiter()
dependencies {
implementation 'org.slf4j:slf4j-log4j12:1.7.36'
implementation 'org.apache.activemq:artemis-server:2.31.2'
implementation 'org.apache.activemq:artemis-jms-server:2.31.2'
implementation 'org.junit.jupiter:junit-jupiter-api:5.10.1'
implementation 'org.assertj:assertj-core:3.24.2'
implementation 'org.mockito:mockito-core:5.7.0'
runtimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.1'
}
}
}
}
spotless {
java {
googleJavaFormat()
endWithNewline()
}
groovyGradle {
greclipse('4.27')
indentWithSpaces(2)
endWithNewline()
}
}
versioner {
startFrom {
major = 2
minor = 1
}
}
publishing {
repositories {
maven {
url = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
credentials {
username = findProperty('publishUsername')
password = findProperty('publishPassword')
}
}
}
publications {
mavenJava(MavenPublication) {
from components.java
pom {
name = 'JMS Responder'
description = 'A stub for JMS Request/Reply'
url = 'https://github.com/goughy000/jms-responder'
licenses {
license {
name = 'MIT License'
url = 'https://opensource.org/licenses/MIT'
}
}
developers {
developer {
name = 'Jack Gough'
organization = 'Testing Syndicate'
organizationUrl = 'https://testingsyndicate.com/'
}
}
scm {
connection = 'scm:git:git://github.com/goughy000/jms-responder.git'
developerConnection = 'scm:git:git://github.com/goughy000/jms-responder.git'
url = 'https://github.com/goughy000/jms-responder.git'
}
}
}
}
}
signing {
useInMemoryPgpKeys(decode(findProperty('signingKey')), '')
sign publishing.publications.mavenJava
}
}
project(':jms-responder-maven-plugin') {
apply plugin: 'com.liferay.maven.plugin.builder'
dependencies {
implementation project(':')
api 'org.apache.maven:maven-plugin-api:3.9.5'
api 'org.apache.maven.plugin-tools:maven-plugin-annotations:3.10.2'
}
buildPluginDescriptor {
goalPrefix = 'jms-responder'
pomGroupId = project.group
pomArtifactId = project.name
classesDir = sourceSets.main.java.classesDirectory
mavenPluginPluginVersion = '3.9.0'
}
afterEvaluate {
buildPluginDescriptor {
pomVersion = project.version
}
}
publishing.publications.mavenJava.pom.packaging = 'maven-plugin'
processResources.dependsOn('buildPluginDescriptor')
sourcesJar.dependsOn('buildPluginDescriptor')
}
def decode(encoded) {
new String(Base64.getDecoder().decode(encoded ?: ''))
}