forked from corretto/hotpatch-for-apache-log4j2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
75 lines (66 loc) · 1.93 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
import org.gradle.internal.jvm.Jvm
plugins {
id 'java'
// ========== begin moda-custom block1 ==========
// I hope that the corretto squad will publish this themselves, but for now to publish:
// ensure this fork (https://github.com/ModaOperandi/hotpatch-for-apache-log4j2) is in sync with upstream
// > git pull --tags
// > ./gradlew artifactoryPublish (assuming JFROG_USER and JFROG_PASS in your env)
id 'maven-publish'
id "com.jfrog.artifactory" version "4.25.2"
// ========== moda-custom block1 ==========
}
// ========== begin moda-custom block2 ==========
artifactory {
publish {
contextUrl = 'https://moda.jfrog.io/moda'
repository {
repoKey = 'sbt'
username = "$System.env.JFROG_USER"
password = "$System.env.JFROG_PASS"
maven = true
}
defaults {
publications('mavenJava')
}
publishBuildInfo = false
publishArtifacts = true
publishPom = true
}
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
}
// ========== moda-custom block2 ==========
group 'com.amazon.corretto.hotpatch'
version = file('version.txt').text.trim()
repositories {
mavenCentral()
}
jar {
archiveFileName.set('Log4jHotPatch.jar')
manifest {
from 'src/main/resources/MANIFEST.MF'
attributes (
'Implementation-Version': archiveVersion.get(),
'Build-Jdk': System.properties.getProperty('java.version'),
'Created-By': "Gradle ${getGradle().getGradleVersion()}"
)
}
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
}
compileJava {
sourceCompatibility = '1.7'
targetCompatibility = '1.7'
}
dependencies {
if (Jvm.current().javaVersion.java8) {
compileOnly files(Jvm.current().toolsJar)
}
}
test {
}