-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
86 lines (76 loc) · 2.55 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
plugins {
id "java-library"
id "maven-publish"
id "com.timgroup.jarmangit" version "1.1.86"
}
group = 'com.timgroup'
if (System.getenv("BUILD_NUMBER")) version = "1.0.${System.getenv('BUILD_NUMBER')}"
ext {
slf4jVersion = "1.7.25"
jettyVersion = "9.4.27.v20200227"
}
jar {
manifest {
attributes(
'Implementation-Title': project.name,
'Implementation-Version': project.version,
'Implementation-Vendor': 'TIM Group Ltd',
'Automatic-Module-Name': 'com.timgroup.tucker'
)
}
}
tasks.withType(JavaCompile).all {
options.encoding = "UTF-8"
options.deprecation = true
options.compilerArgs << "-parameters"
options.compilerArgs << "-Xlint:unchecked"
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
withSourcesJar()
withJavadocJar()
}
repositories {
maven {
url = "$repoUrl/groups/public"
}
}
// some of these dependencies are optional, in that they are needed to build, but might not be needed to run; Gradle does currently let us say so
dependencies {
implementation "org.slf4j:slf4j-api:$slf4jVersion"
implementation "javax.servlet:javax.servlet-api:3.0.1"
implementation "com.fasterxml.jackson.core:jackson-core:2.6.0"
api "io.dropwizard.metrics:metrics-core:3.2.0"
implementation "io.prometheus:simpleclient_dropwizard:0.9.0"
implementation "io.prometheus:simpleclient:0.9.0"
testImplementation "junit:junit:4.13"
testImplementation "org.mockito:mockito-core:2.25.1"
testImplementation "org.araqnid:hamkrest-json:1.1.0"
testImplementation "org.hamcrest:hamcrest-library:1.3"
testImplementation "com.fasterxml.jackson.core:jackson-databind:2.6.0"
testImplementation "com.google.guava:guava:28.0-jre"
testRuntimeOnly "org.slf4j:slf4j-simple:$slf4jVersion"
}
publishing {
repositories {
if (project.hasProperty("repoUrl")) {
maven {
name "nexus"
url "${project.repoUrl}/repositories/yd-release-candidates"
credentials {
username = project.repoUsername
password = project.repoPassword
}
}
}
}
publications {
mavenJava(MavenPublication) {
artifactId project.ext.has('artifactId') ? project.ext.artifactId
: project == rootProject ? project.name
: rootProject.name + project.path.replace(':', '-')
from components.java
}
}
}