-
Notifications
You must be signed in to change notification settings - Fork 18
/
build.gradle
61 lines (52 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
58
59
60
61
import io.github.gradlenexus.publishplugin.InitializeNexusStagingRepository
plugins {
id 'groovy'
id 'io.github.gradle-nexus.publish-plugin'
}
version = projectVersion
ext.set('grailsVersion', libs.versions.grails.get())
ext.set('isSnapshot', projectVersion.endsWith('-SNAPSHOT'))
ext.set('isReleaseVersion', !isSnapshot)
if(isReleaseVersion) {
nexusPublishing {
String nexusUser = project.findProperty('sonatypeOssUsername')
String nexusPass = project.findProperty('sonatypeOssPassword')
String nexusStagingProfileId = project.findProperty('sonatypeOssStagingProfileId')
repositories {
sonatype {
nexusUrl = uri('https://s01.oss.sonatype.org/service/local/')
username = nexusUser
password = nexusPass
stagingProfileId = nexusStagingProfileId
}
}
}
}
subprojects {
apply plugin: 'groovy'
version = rootProject.version
repositories {
mavenLocal() // Used by Groovy Joint Workflow
mavenCentral()
maven { url = 'https://repo.grails.org/grails/core' }
if (libs.versions.groovy.get().endsWith('-SNAPSHOT')) {
maven {
name = 'JFrog Groovy snapshot repo'
url = 'https://groovy.jfrog.io/artifactory/libs-snapshot-local/'
}
}
}
dependencies {
implementation platform(libs.grails.bom)
}
tasks.withType(Test).configureEach {
useJUnitPlatform()
testLogging {
events 'passed', 'skipped', 'failed', 'standardOut', 'standardError'
}
}
}
//do not generate extra load on Nexus with new staging repository if signing fails
tasks.withType(InitializeNexusStagingRepository).configureEach {
shouldRunAfter tasks.withType(Sign)
}