This repository has been archived by the owner on Jan 23, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle
132 lines (113 loc) · 3.6 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
import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
id "com.github.johnrengelman.shadow" version "7.1.2"
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
def jpprofVersion = project.properties['jpprof_version']
repositories {
mavenCentral()
maven {
url = uri("https://s01.oss.sonatype.org/content/repositories/snapshots")
mavenContent {
snapshotsOnly()
}
}
}
java {
withJavadocJar()
withSourcesJar()
}
dependencies {
// This dependency is exported to consumers, that is to say found on their compile classpath.
// api 'org.apache.commons:commons-math3:3.6.1'
// This dependency is used internally, and not exposed to consumers on their own compile classpath.
implementation 'com.google.guava:guava:31.0.1-jre'
implementation('me.bechberger:ap-loader:2.8.3-all-SNAPSHOT') {
changing = true
}
}
configurations.all {
resolutionStrategy.cacheDynamicVersionsFor 4, 'hours'
resolutionStrategy.cacheChangingModulesFor 4, 'seconds'
}
tasks.withType(Test) {
systemProperty "java.library.path", "$projectDir/lib/natives/"
}
testing {
suites {
// Configure the built-in test suite
test {
// Use JUnit4 test framework
useJUnit('4.13.2')
}
}
}
shadowJar {
exclude '**.html'
archiveBaseName.set('jpprof')
archiveClassifier.set('')
archiveVersion.set(jpprofVersion)
minimize()
}
task relocateShadowJar(type: ConfigureShadowRelocation) {
target = tasks.shadowJar
prefix = "jpprof"
}
tasks.shadowJar.dependsOn tasks.relocateShadowJar
publishing {
publications {
shadow(MavenPublication) { publication ->
project.shadow.component(publication)
groupId = 'com.grafana'
artifactId = 'jpprof'
version = jpprofVersion
artifacts = [ shadowJar, javadocJar, sourcesJar ]
pom {
name = 'Java PProf'
description = 'Go Pprof but for Java runtime.'
url = 'https://grafana.com'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'ctovena'
name = 'Cyril Tovena'
email = '[email protected]'
}
developer {
id = 'cristiangreco'
name = 'Cristian Greco'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:git://github.com/grafana/jpprof.git'
developerConnection = 'scm:git:ssh://github.com/grafana/jpprof.git'
url = 'https://github.com/grafana/jpprof'
}
}
}
}
repositories {
maven {
name = 'OSSRH'
url = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
credentials {
username = System.getenv('OSSRH_USERNAME')
password = System.getenv('OSSRH_PASSWORD')
}
}
}
}
signing {
sign publishing.publications.shadow
useInMemoryPgpKeys(System.getenv('SIGNING_KEY'), System.getenv('SIGNING_PASSWORD'))
}