-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathbuild.gradle
More file actions
152 lines (118 loc) · 4.08 KB
/
build.gradle
File metadata and controls
152 lines (118 loc) · 4.08 KB
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
152
buildscript {
repositories {
maven {url "https://plugins.gradle.org/m2/"}
}
}
plugins {
id 'java-library'
id 'eclipse'
id 'maven-publish'
}
// TODO I don't know why this needs to be specified, as this is already specified in the parent build.gradle (as is apply plugin: 'java')
// however, it seems to be ignored by this subproject, both in eclipse and on Jenkins
sourceSets {
test {
java {
srcDir 'test'
srcDir 'test-gen'
}
resources {
srcDirs = ['test-resources']
}
}
}
sourceCompatibility = 17
targetCompatibility = 17
// The following lines are necessay to create a test jar
project.configurations {
testArchives.extendsFrom (testCompile)
}
project.task ('jarTest', type:Jar, dependsOn: project.testClasses, description: 'create a jar from the test source set') {
from project.sourceSets.test.output
archiveClassifier = 'test'
}
project.artifacts {
testArchives project.jarTest
}
repositories {
mavenCentral()
}
dependencies {
implementation project(':common')
implementation "com.rabbitmq:amqp-client:$libAmqpVersion"
implementation "org.jctools:jctools-core:$libJctoolsVersion"
implementation "com.github.oshi:oshi-core:6.10.0"
// https://mvnrepository.com/artifact/org.influxdb/influxdb-java
implementation "org.influxdb:influxdb-java:2.25"
implementation "org.tukaani:xz:$libXzVersion" // compression algorithms used by the file writers
implementation "org.apache.cxf:cxf-bundle-minimal:$libCxfVersion"
implementation "org.apache.commons:commons-compress:1.28.0"
implementation "org.glassfish.jersey.core:jersey-server:$jerseyVersion"
implementation "org.glassfish.jersey.core:jersey-common:$jerseyVersion"
implementation "org.glassfish.jersey.core:jersey-client:$jerseyVersion"
implementation "javax.servlet:javax.servlet-api:4.0.1"
implementation "javax.jms:javax.jms-api:2.0.1"
implementation "jakarta.xml.bind:jakarta.xml.bind-api:4.0.5"
implementation "javax.jws:javax.jws-api:1.1"
implementation "org.influxdb:influxdb-java:2.25"
implementation "com.squareup.okhttp3:okhttp:5.3.2"
// testing
testImplementation "org.hamcrest:hamcrest:$libHamcrestVersion"
testImplementation "org.javassist:javassist:3.30.2-GA"
testImplementation "junit:junit:$libJunitVersion"
testImplementation "org.objenesis:objenesis:3.5"
testImplementation "org.easymock:easymock:5.6.0"
testImplementation "org.mockito:mockito-core:$libMockitoVersion"
// this project depends on the tests of common, e.g., it requires the class AbstractKiekerTest
testImplementation project (path: ':common', configuration: 'testArchives')
testImplementation "org.eclipse.jetty:jetty-server:12.1.7"
testImplementation "org.eclipse.jetty.ee10:jetty-ee10-webapp:12.1.7"
testImplementation "org.eclipse.jetty.ee10:jetty-ee10-apache-jsp:12.1.7"
testImplementation "commons-io:commons-io:2.21.0"
testImplementation project(':common').sourceSets.test.output
}
// publishing
publishing {
publications {
maven(MavenPublication) {
groupId = 'net.kieker-monitoring'
artifactId = 'monitoring-core'
version = version
from components.java
}
}
repositories {
maven {
def mavenUser = "NoMavenUser"
if (System.env.kiekerMavenUser != null) {
mavenUser = System.env.kiekerMavenUser
}
def mavenPassword = "NoMavenPassword"
if (System.env.kiekerMavenPassword != null) {
mavenPassword = System.env.kiekerMavenPassword
}
credentials {
username = mavenUser
password = mavenPassword
}
// Maven central:
def releasesRepoUrl = 'https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/'
def snapshotsRepoUrl = 'https://central.sonatype.com/repository/maven-snapshots/'
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
}
}
}
// This is necessary to avoid eclipse problems; eclipse does not allow the same project to be imported twice as dependency
eclipse {
classpath {
file {
whenMerged { classpath ->
classpath.entries.removeAll { entry ->
entry instanceof org.gradle.plugins.ide.eclipse.model.ProjectDependency
&& entry.path == '/common'
&& entry.entryAttributes['test']
}
}
}
}
}