-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
90 lines (76 loc) · 2.33 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
plugins {
id 'java-library'
id 'maven-publish'
id 'com.github.ben-manes.versions'
id 'io.spring.dependency-management' apply false
}
wrapper {
gradleVersion = "${gradleVersion}"
}
group = 'org.serialthreads'
archivesBaseName = 'serialhtreads'
version = '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
java {
// https://docs.gradle.org/current/userguide/toolchains.html
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
// Use Eclipse Temurin (provided by Adoptium).
vendor.set(JvmVendorSpec.ADOPTIUM)
}
}
dependencies {
implementation "org.slf4j:slf4j-api:${slf4jVersion}"
implementation "org.ow2.asm:asm:${asmVersion}"
implementation "org.ow2.asm:asm-analysis:${asmVersion}"
implementation "org.ow2.asm:asm-tree:${asmVersion}"
implementation "org.ow2.asm:asm-util:${asmVersion}"
testImplementation "org.junit.jupiter:junit-jupiter-api:${junitVersion}"
testImplementation "org.junit.platform:junit-platform-launcher:${junitPlatformVersion}"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junitVersion}"
testImplementation "org.assertj:assertj-core:${assertjVersion}"
testRuntimeOnly "org.apache.logging.log4j:log4j-slf4j2-impl:${log4jVersion}"
testRuntimeOnly "org.apache.logging.log4j:log4j-core:${log4jVersion}"
}
jar {
manifest {
attributes(
"Implementation-Title": "SerialThreads",
"Implementation-Version": archiveVersion,
"Premain-Class": "org.serialthreads.agent.Agent",
"Agent-Class": "org.serialthreads.agent.Agent",
"Can-Redefine-Classes": false,
"Can-Retransform-Classes": false)
}
}
task testJar(type: Jar) {
archiveClassifier.set('tests')
from sourceSets.test.output
}
publishing {
publications {
maven(MavenPublication) {
from components.java
}
maven(MavenPublication) {
artifact testJar
}
}
}
build.dependsOn publishToMavenLocal
test {
useJUnitPlatform()
// ignore failing tests
ignoreFailures = true
}
sourceSets {
performanceTest {
java {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
srcDir file('src/test/performance/java')
}
}
}