-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
111 lines (90 loc) · 2.46 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
plugins {
id 'maven-publish'
id 'signing'
}
allprojects {
apply plugin: 'java-library'
repositories {
mavenCentral()
}
dependencies {
api 'org.ow2.asm:asm:9.7'
api 'org.ow2.asm:asm-tree:9.7'
api 'org.ow2.asm:asm-util:9.7'
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.0'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.10.0'
}
compileJava {
options.compilerArgs += [
'--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED'
]
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
withSourcesJar()
withJavadocJar()
}
test {
// Test without attach mechanism and dynamic agent loading
var arguments = [
'-XX:+DisableAttachMechanism',
'-XX:-EnableDynamicAgentLoading'
]
// TODO: find a way to avoid this check on latest OpenJ9
if (System.getProperty("java.vm.vendor") == "Eclipse OpenJ9") {
arguments.remove('-XX:-EnableDynamicAgentLoading')
}
jvmArgs(arguments)
useJUnitPlatform()
}
}
group = "io.github.usernugget"
version = "2.1.4"
javadoc {
options.addStringOption('-add-exports', 'java.base/jdk.internal.misc=ALL-UNNAMED')
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
repositories {
maven {
url = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials {
username = System.getenv("OSSRH_USERNAME")
password = System.getenv("OSSRH_PASSWORD")
}
}
}
pom {
name = 'class-redefiner'
description = "Library to modify classes at runtime"
url = 'https://github.com/UserNugget/class-redefiner/'
developers {
developer {
id = 'usernugget'
}
}
scm {
connection = 'scm:git:git://github.com/UserNugget/class-redefiner/'
developerConnection = 'scm:git:ssh://github.com:UserNugget/class-redefiner.git'
url = 'https://github.com/UserNugget/class-redefiner/tree/main/'
}
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
}
}
}
}
signing {
useInMemoryPgpKeys(
System.getenv("PGP_SIGNING_KEY"),
System.getenv("PGP_SIGNING_KEY_PASSPHRASE")
)
sign publishing.publications.mavenJava
}