-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
48 lines (42 loc) · 1.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
plugins {
id 'maven-publish'
id 'java-library'
id "com.github.johnrengelman.shadow" version "5.1.0"
}
group = 'io.github.ddimtirov.gradle'
version = System.getenv('VERSION') ?: version
repositories.jcenter()
dependencies.implementation 'net.bytebuddy:byte-buddy:1.10.12'
targetCompatibility = 1.6
sourceCompatibility = 1.6
compileJava.options.compilerArgs.add('-Xlint:-options')
jar {
manifest.attributes(
'Premain-Class': 'io.github.ddimtirov.gradle.wrapperoverride.GradleWrapperOverrideAgent',
'Can-Redefine-Classes': true,
'Can-Retransform-Classes': true
)
manifest.attributes('io.github.ddimtirov.gradle.wrapperoverride',
'Specification-Title': 'Gradle Wrapper Override Agent',
'Specification-Version': version ?: 'UNKNOWN',
'Specification-Vendor': 'http://github.com/ddimtirov/gwo-agent',
'Implementation-Title': "$project.group:$project.name",
'Implementation-Version': System.getenv('GIT_COMMIT') ?: 'UNKNOWN',
'Implementation-Vendor': System.getenv('JITPACK') ? 'https://jitpack.io' : 'UNKNOWN'
)
enabled = false
}
shadowJar {
classifier = null
relocate 'net.bytebuddy', 'relocated.wrapperoverride.bytebuddy'
minimize()
preserveFileTimestamps = false
assemble.dependsOn it
}
publishing {
publications {
agent(MavenPublication) { publication ->
project.shadow.component(publication)
}
}
}