-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathbuild.gradle
107 lines (90 loc) · 2.43 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
plugins {
id 'com.github.johnrengelman.shadow' version '7.1.0'
id 'java'
id 'maven-publish'
}
group = 'trust.nccgroup'
version = '1.1.0'
sourceCompatibility = 1.6
targetCompatibility = 1.6
repositories {
mavenCentral()
}
dependencies {
implementation group: 'net.bytebuddy', name: 'byte-buddy', version: '[1.12.0, 1.13)'
}
sourceSets {
main {
java {
srcDirs = ['./src']
}
resources {
srcDirs = ['./res']
}
}
}
jar {
manifest {
attributes (
"Manifest-Version": "1.0",
"Can-Redefine-Classes": "true",
"Can-Retransform-Classes": "true",
"Can-Set-Native-Method-Prefix": "true",
"Premain-Class": "trust.nccgroup.jndibegone.PreMain",
"Agent-Class": "trust.nccgroup.jndibegone.AgentMain"
)
}
}
compileJava {
options.compilerArgs << '-Xlint:unchecked'
}
task sourceJar(type: Jar) {
from sourceSets.main.allJava
classifier = 'sources'
}
task javadocJar(type: Jar) {
from javadoc
classifier = 'javadoc'
}
artifacts {
archives javadocJar, sourceJar
}
shadowJar {
// removes -all from the build
classifier = 'standalone'
//classifier = ''
relocate 'net.bytebuddy', 'trust.nccgroup.jndibegone.vendor.net.bytebuddy'
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
//shadow(MavenPublication) { publication ->
//project.shadow.component(publication)
pom {
name = 'log4j-jndi-be-gone'
description =
url = 'https://github.com/nccgroup/log4j-jndi-be-gone'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'chaosdata'
name = 'Jeff Dileo'
email = 'jeff.dileo@nccgroup.com'
}
}
scm {
url = 'https://github.com/nccgroup/log4j-jndi-be-gone'
connection = 'scm:git:git://github.com/nccgroup/log4j-jndi-be-gone.git'
developerConnection = 'scm:git:ssh:git@github.com:nccgroup/log4j-jndi-be-gone.git'
}
}
}
}
}
defaultTasks "jar", "shadowJar", "publishToMavenLocal"