@@ -39,39 +39,40 @@ final String docWebsiteReactiveFolder = project.layout.buildDirectory.dir( "docs
39
39
/**
40
40
* Assembles all documentation into the {buildDir}/documentation directory.
41
41
*/
42
- tasks. register( ' assembleDocumentation' ) {
42
+ def assembleDocumentationTask = tasks. register( ' assembleDocumentation' ) {
43
43
dependsOn ' :documentation:assemble'
44
44
group ' Documentation'
45
45
description ' Render the documentation'
46
46
}
47
- assemble. dependsOn assembleDocumentation
47
+ assemble. dependsOn assembleDocumentationTask
48
48
49
49
/**
50
50
* Clone the website
51
51
*/
52
- tasks. register( ' removeDocsWebsite' , Delete ) {
52
+ def removeDocsWebsiteTask = tasks. register( ' removeDocsWebsite' , Delete ) {
53
53
delete project. layout. buildDirectory. dir( " docs-website" )
54
54
}
55
55
56
- // Depending on compileJava makes sure that the buildDir exists. Otherwise this task will fail.
57
- tasks. register( ' cloneDocsWebsite' , Exec ) {
58
- dependsOn removeDocsWebsite, compileJava
56
+ def cloneDocsWebsiteTask = tasks. register( ' cloneDocsWebsite' , Exec ) {
57
+ dependsOn removeDocsWebsiteTask
58
+ // Assure that the buildDir exists. Otherwise this task will fail.
59
+ dependsOn compileJava
59
60
workingDir project. layout. buildDirectory
60
61
commandLine ' git' , ' clone' , docPublishRepoUri, ' -b' , docPublishBranch, ' --sparse' , ' --depth' , ' 1' , ' docs-website'
61
62
}
62
63
63
- tasks. register( ' sparseCheckoutDocumentation' , Exec ) {
64
- dependsOn cloneDocsWebsite
64
+ def sparseCheckoutDocumentationTask = tasks. register( ' sparseCheckoutDocumentation' , Exec ) {
65
+ dependsOn cloneDocsWebsiteTask
65
66
workingDir project. layout. buildDirectory. dir( " docs-website" )
66
67
commandLine ' git' , ' sparse-checkout' , ' set' , docWebsiteRelativePath
67
68
}
68
69
69
70
/**
70
71
* Update the docs on the cloned website
71
72
*/
72
- tasks. register( ' updateDocumentation' ) {
73
- dependsOn assembleDocumentation, sparseCheckoutDocumentation
74
- description = " Update the documentation on the cloned static website "
73
+ def updateDocumentationTask = tasks. register( ' updateDocumentation' ) {
74
+ description " Update the documentation on the cloned static website "
75
+ dependsOn assembleDocumentationTask, sparseCheckoutDocumentationTask
75
76
76
77
// copy documentation outputs into target/documentation:
77
78
// * this is used in building the dist bundles
@@ -95,40 +96,40 @@ tasks.register( 'updateDocumentation' ) {
95
96
}
96
97
}
97
98
98
- /**
99
- * Push documentation changes on the remote repository
100
- */
101
- tasks. register( ' stageDocChanges' , Exec ) {
102
- dependsOn updateDocumentation
99
+ def stageDocChangesTask = tasks. register( ' stageDocChanges' , Exec ) {
100
+ dependsOn updateDocumentationTask
103
101
workingDir project. layout. buildDirectory. dir( " docs-website" )
104
102
commandLine ' git' , ' add' , ' -A' , ' .'
105
103
}
106
104
107
- tasks. register( ' commitDocChanges' , Exec ) {
108
- dependsOn stageDocChanges
109
- workingDir " ${ project.buildDir } / docs-website"
105
+ def commitDocChangesTask = tasks. register( ' commitDocChanges' , Exec ) {
106
+ dependsOn stageDocChangesTask
107
+ workingDir project. layout . buildDirectory . dir( " docs-website" )
110
108
commandLine ' git' , ' commit' , ' -m' , " [HR] Hibernate Reactive documentation for ${ projectVersion} "
111
109
}
112
110
113
- tasks. register( ' pushDocChanges' , Exec ) {
114
- dependsOn commitDocChanges
111
+ def pushDocChangesTask = tasks. register( ' pushDocChanges' , Exec ) {
112
+ description " Push documentation changes on the remote repository"
113
+ dependsOn commitDocChangesTask
115
114
workingDir project. layout. buildDirectory. dir( " docs-website" )
116
115
commandLine ' git' , ' push' , ' --atomic' , ' origin' , docPublishBranch
117
116
}
118
117
119
- tasks. register( ' publishDocumentation' ) {
120
- dependsOn pushDocChanges
121
- group = " Release "
122
- description = " Upload documentation on the website "
118
+ def publishDocumentationTask = tasks. register( ' publishDocumentation' ) {
119
+ description " Upload documentation on the website "
120
+ dependsOn pushDocChangesTask
121
+ group " Release "
123
122
124
123
doLast {
125
124
logger. lifecycle " Documentation published on '${ docPublishRepoUri} ' branch '${ docPublishBranch} '"
126
125
}
127
126
}
128
127
129
- tasks. register( " releasePrepare" ) {
130
- group = " Release"
131
- description = " Performs release preparations on local check-out, including updating changelog"
128
+ def releasePrepareTask = tasks. register( " releasePrepare" ) {
129
+ description " Performs release preparations on local check-out, including updating changelog"
130
+ group " Release"
131
+ dependsOn commitDocChangesTask
132
+
132
133
doFirst {
133
134
if ( ! project. hasProperty( ' releaseVersion' ) || ! project. hasProperty( ' developmentVersion' )
134
135
|| ! project. hasProperty( ' gitRemote' ) || ! project. hasProperty( ' gitBranch' ) ) {
@@ -162,9 +163,9 @@ tasks.register( "releasePrepare" ) {
162
163
/*
163
164
* Release everything
164
165
*/
165
- tasks. register( ' ciRelease' ) {
166
- group = " Release "
167
- description = " Triggers the release on CI: creates commits to change the version (release, then development), creates a tag, pushes everything. Then CI will take over and perform the release. "
166
+ def ciReleaseTask = tasks. register( ' ciRelease' ) {
167
+ description " Triggers the release on CI: creates commits to change the version (release, then development), creates a tag, pushes everything. Then CI will take over and perform the release. "
168
+ group " Release "
168
169
dependsOn releasePrepare
169
170
170
171
doFirst {
0 commit comments