-
Notifications
You must be signed in to change notification settings - Fork 98
/
build.gradle
57 lines (48 loc) · 1.79 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
subprojects {
apply from: "$rootDir/gradle/publishing.gradle"
group = "io.projectreactor.tools"
repositories {
mavenCentral()
}
tasks.withType(Test).all {
def javaMajorVersion = System.getProperty("java.version").split("\\.", 2)[0].toInteger()
if (javaMajorVersion >= 13) {
jvmArgs += [
"-XX:+AllowRedefinitionToAddDeleteMethods"
]
}
}
plugins.withType(SigningPlugin) {
//skipping if not .RELEASE. Note the task graph is still being evaluated here.
//This works because the version is only defined by CI scripts, and only the release one should use .RELEASE suffix
def shouldSign = version.toString().endsWith(".RELEASE")
project.signing {
required { shouldSign }
//skip the configuration entirely if !shouldSign. the task shouldn't even be available
if (shouldSign) {
def signingKey = System.getenv('GRADLE_SIGNING_KEY')
def signingPassword = System.getenv('GRADLE_SIGNING_PASSWORD')
useInMemoryPgpKeys(signingKey, signingPassword)
afterEvaluate {
sign publishing.publications.mavenJava
}
}
}
}
plugins.withType(MavenPublishPlugin) {
project.publishing {
repositories {
maven {
url System.getenv('GRADLE_PUBLISH_REPO_URL')
credentials {
username = System.getenv('GRADLE_PUBLISH_MAVEN_USER')
password = System.getenv('GRADLE_PUBLISH_MAVEN_PASSWORD')
}
}
}
}
}
tasks.withType(GenerateModuleMetadata) {
enabled = false
}
}