-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
141 lines (118 loc) · 4.59 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
buildscript {
repositories {
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath "io.github.gradle-nexus:publish-plugin:2.0.0"
classpath "org.graceframework:grace-gradle-plugin:$graceVersion"
classpath "org.gradle:test-retry-gradle-plugin:1.6.0"
classpath "io.spring.gradle:dependency-management-plugin:$springDependencyManagementPluginVersion"
}
}
ext {
isReleaseVersion = !project.projectVersion.endsWith('-SNAPSHOT')
graceVersion = project.graceVersion
userOrg = "graceframework"
}
version = project.projectVersion
apply plugin:'idea'
apply plugin: 'maven-publish'
apply plugin: "io.github.gradle-nexus.publish-plugin"
nexusPublishing {
repositories {
sonatype {
def ossUser = System.getenv("SONATYPE_USERNAME") ?: project.hasProperty("sonatypeOssUsername") ? project.sonatypeOssUsername : ''
def ossPass = System.getenv("SONATYPE_PASSWORD") ?: project.hasProperty("sonatypeOssPassword") ? project.sonatypeOssPassword : ''
def ossStagingProfileId = System.getenv("SONATYPE_STAGING_PROFILE_ID") ?: project.hasProperty("sonatypeOssStagingProfileId") ? project.sonatypeOssStagingProfileId : ''
nexusUrl = uri("https://s01.oss.sonatype.org/service/local/")
snapshotRepositoryUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
username = ossUser
password = ossPass
stagingProfileId = ossStagingProfileId
}
}
}
subprojects { project->
if (project.name.startsWith('grace-plugin')) {
group = "org.graceframework.plugins"
}
else {
group = "org.graceframework"
}
version = project.projectVersion
if (project.name.startsWith('examples') || project.name.endsWith('docs')) {
return
}
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'java-library'
apply plugin: 'groovy'
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: "org.gradle.test-retry"
apply plugin: "io.spring.dependency-management"
if (project.name.startsWith('grace-plugin')) {
apply plugin: 'org.graceframework.grace-plugin'
}
repositories {
mavenCentral()
}
dependencyManagement {
imports {
mavenBom "org.graceframework:grace-bom:$graceVersion"
}
applyMavenExclusions false
}
apply from: '../publishing/mavenCentral.gradle'
if (project.name.startsWith('grace-')) {
configurations {
documentation
}
dependencies {
api "org.apache.groovy:groovy:$groovyVersion"
api "org.slf4j:slf4j-api:$slf4jVersion"
documentation "org.fusesource.jansi:jansi:$jansiVersion"
documentation "org.apache.groovy:groovy-dateutil:$groovyVersion"
documentation "info.picocli:picocli:4.6.3"
documentation "com.github.javaparser:javaparser-core:$javaParserCoreVersion"
testImplementation "org.spockframework:spock-core:$spockVersion", {
exclude group: "org.junit.platform", module: "junit-platform-engine"
}
testImplementation "net.bytebuddy:byte-buddy:$bytebuddyVersion"
testImplementation "org.objenesis:objenesis:$objenesisVersion"
testImplementation "org.apache.groovy:groovy-test-junit5:${groovyVersion}", {
exclude group: "org.junit.platform", module: "junit-platform-launcher"
exclude group: "org.junit.jupiter", module: "junit-jupiter-engine"
}
testImplementation "org.junit.jupiter:junit-jupiter-api:$junitJupiterVersion"
testImplementation "org.junit.platform:junit-platform-runner:$junitJupiterPlatformVersion"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junitJupiterVersion"
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
withJavadocJar()
withSourcesJar()
}
tasks.withType(Test) {
useJUnitPlatform()
testLogging {
showStandardStreams = true
exceptionFormat = 'full'
}
configure {
retry {
maxRetries = 2
maxFailures = 20
failOnPassedAfterRetry = true
}
}
}
tasks.named('compileJava') {
inputs.files(tasks.named('processResources'))
}
groovydoc.classpath = configurations.documentation
}
}