-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
112 lines (96 loc) · 3.09 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
plugins {
id 'java'
id 'maven-publish'
id 'signing'
id 'tech.yanand.maven-central-publish' version "$MAVEN_CENTRAL_PUBLISH_PLUGIN_VERSION"
}
group = 'one.jpro'
version = "$JMEMORYBUDDY_VERSION"
java {
sourceCompatibility = 11
targetCompatibility = 11
// Sonatype officially requires Java source and Java doc
withJavadocJar()
withSourcesJar()
}
repositories {
mavenCentral()
}
dependencies {
testImplementation "org.junit.jupiter:junit-jupiter:$JUNIT_VERSION"
testImplementation "org.junit.jupiter:junit-jupiter-api:$JUNIT_VERSION"
testImplementation "org.junit.jupiter:junit-jupiter-params:$JUNIT_VERSION"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$JUNIT_VERSION"
testRuntimeOnly "ch.qos.logback:logback-classic:$LOGBACK_VERSION"
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
showStandardStreams = true
showExceptions true
showCauses true
showStackTraces true
exceptionFormat "full"
}
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
groupId project.group
artifactId project.name.toLowerCase()
version project.version
pom {
name = project.name
description = 'A library usefull for unit testing memory leaks'
url = 'https://github.com/Sandec/JMemoryBuddy'
scm {
connection = 'https://github.com/Sandec/JMemoryBuddy.git'
developerConnection = 'https://github.com/Sandec/JMemoryBuddy.git'
url = 'https://github.com/Sandec/JMemoryBuddy'
}
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'floriankirmaier'
name = 'Florian Kirmaier'
email = 'florian.kirmaier@gmail.com'
}
}
}
}
}
repositories {
maven {
name = "artifactory"
url = "https://sandec.jfrog.io/artifactory/repo"
credentials {
username System.getenv("SANDEC_ARTIFACTORY_USERNAME")
password System.getenv("SANDEC_ARTIFACTORY_PASSWORD")
}
}
maven {
name = "staging-deploy"
url = layout.buildDirectory.dir('staging-deploy')
}
}
}
signing {
useInMemoryPgpKeys (
System.getenv("SANDEC_SIGNING_KEY_ID"),
System.getenv("SANDEC_SIGNING_SECRET_KEY"),
System.getenv("SANDEC_SIGNING_PASSWORD")
)
sign publishing.publications.mavenJava
}
mavenCentral {
repoDir = layout.buildDirectory.dir('staging-deploy')
authToken = System.getenv("SANDEC_SONATYPE_AUTH_TOKEN")
publishingType = 'USER_MANAGED'
}