-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.gradle
More file actions
30 lines (24 loc) · 828 Bytes
/
build.gradle
File metadata and controls
30 lines (24 loc) · 828 Bytes
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
apply from: 'sonatype-api.gradle'
allprojects {
group = 'io.github.jmecn'
version = '0.2.4'
tasks.withType(JavaCompile).tap {
configureEach {
options.encoding = 'UTF-8'
}
}
}
// Notify Sonatype upload after all publish tasks are completed
gradle.projectsEvaluated {
// get publish tasks from all subprojects
def publishTasks = subprojects.collect { subproject ->
subproject.tasks.matching { it.name.startsWith('publish') && it.name.endsWith('PublicationToOSSRHRepository') }
}.flatten()
// register a new task to trigger Sonatype upload
tasks.register('allPublishToOSSRH') {
group = 'publishing'
description = 'Publish all modules to OSSRH and notify Sonatype'
dependsOn publishTasks
finalizedBy sonatypeUpload
}
}