@@ -33,7 +33,7 @@ gradle.projectsEvaluated { // Several statements below rely upon all subproject
3333 description = ' Generate Javadoc for the CDM subproject.'
3434
3535 title = " NetCDF-Java CDM Public API v${ version} "
36- destinationDir = file(" $buildDir /javadocCdm /" )
36+ destinationDir = file(" $buildDir /javadoc /" )
3737
3838 options. showFromPublic()
3939 options. noDeprecated()
@@ -65,7 +65,7 @@ gradle.projectsEvaluated { // Several statements below rely upon all subproject
6565 description = ' Generate Javadoc for the CDM subproject - included deprecated classes and methods.'
6666
6767 title = " NetCDF-Java CDM Public API v${ version} - with deprecations"
68- destinationDir = file(" $buildDir /javadocCdmWithDeps /" )
68+ destinationDir = file(" $buildDir /javadoc-with-deprecations /" )
6969
7070 SourceSet cdmCoreSourceSet = rootProject. project(' :cdm:cdm-core' ). sourceSets. main
7171 source cdmCoreSourceSet. allJava
@@ -107,7 +107,7 @@ gradle.projectsEvaluated { // Several statements below rely upon all subproject
107107
108108 tasks. build {
109109 // Aggregates the individual "build*" tasks.
110- dependsOn buildJekyllSite, buildJavadocPublicApi, buildJavadocAll
110+ dependsOn buildJekyllSite, buildJavadocPublicApi, buildJavadocPublicApiWithDeps, buildJavadocAll
111111 }
112112}
113113
@@ -174,137 +174,6 @@ tasks.register("stopServe", Exec) {
174174 delete(" $projectDir /src/site/Gemfile.lock" )
175175}
176176
177- import edu.ucar.build.publishing.tasks.PublishToRawRepoTask
178-
179- tasks. withType(PublishToRawRepoTask ). all { // Common PublishToRawRepoTask config.
180- group = ' Documentation'
181-
182- host = ' https://artifacts.unidata.ucar.edu/'
183- repoName = ' docs-netcdf-java'
184-
185- onlyIf {
186- // Will be evaluated at task execution time, not during configuration.
187- // Fails the build if the specified properties haven't been provided.
188- username = getPropertyOrFailBuild NEXUS_USERNAME_KEY
189- password = getPropertyOrFailBuild NEXUS_PASSWORD_KEY
190- return true
191- }
192- }
193-
194- tasks. register(' publishAsVersionedUserGuide' , PublishToRawRepoTask ) {
195- description = ' Publish user guide (versioned) to Nexus under /major.minor/.'
196- publishSrc = siteBuildDir. get(). toString()
197- destPath = " $project . docVersion /userguide/"
198- dependsOn tasks. getByName(' buildJekyllSite' )
199- }
200-
201- tasks. register(' publishAsCurrentUserGuide' , PublishToRawRepoTask ) {
202- description = ' Publish the user guide to Nexus under /current/.'
203- publishSrc = siteBuildDir. get(). toString()
204- destPath = ' current/userguide/'
205- dependsOn tasks. getByName(' buildJekyllSite' )
206- }
207-
208- gradle. projectsEvaluated {
209- // These tasks must be in a "projectsEvaluated" block because they depend on tasks that are also in a
210- // "projectsEvaluated" block.
211-
212- task publishAsVersionedJavadocPublicApi(type : PublishToRawRepoTask , dependsOn : buildJavadocPublicApi) {
213- description = ' Publish Javadoc for the CDM subproject to Nexus under /major.minor/.'
214-
215- publishSrc = tasks. buildJavadocPublicApi. destinationDir
216- destPath = " $project . docVersion /javadoc/"
217- }
218-
219- task publishAsCurrentJavadocPublicApi(type : PublishToRawRepoTask , dependsOn : buildJavadocPublicApi) {
220- description = ' Publish Javadoc for the CDM subproject to Nexus under /current/.'
221-
222- publishSrc = tasks. buildJavadocPublicApi. destinationDir
223- destPath = ' current/javadoc/'
224- }
225-
226- task publishAsVersionedJavadocPublicApiWithDeps(type : PublishToRawRepoTask , dependsOn : buildJavadocPublicApiWithDeps) {
227- description = ' Publish Javadoc for the CDM subproject to Nexus under /major.minor/.'
228-
229- publishSrc = tasks. buildJavadocPublicApiWithDeps. destinationDir
230- destPath = " $project . docVersion /javadoc-with-deprecations/"
231- }
232-
233- task publishAsCurrentJavadocPublicApiWithDeps(type : PublishToRawRepoTask , dependsOn : buildJavadocPublicApiWithDeps) {
234- description = ' Publish Javadoc for the CDM subproject to Nexus under /current/.'
235-
236- publishSrc = tasks. buildJavadocPublicApiWithDeps. destinationDir
237- destPath = ' current/javadoc-with-deprecations/'
238- }
239-
240- task publishAsVersionedJavadocAll(type : PublishToRawRepoTask , dependsOn : buildJavadocAll) {
241- description = ' Publish Javadoc for all Java subprojects to Nexus under /major.minor/.'
242-
243- publishSrc = tasks. buildJavadocAll. destinationDir
244- destPath = " $project . docVersion /javadocAll/"
245- }
246-
247- task publishAsCurrentJavadocAll(type : PublishToRawRepoTask , dependsOn : buildJavadocAll) {
248- description = ' Publish Javadoc for all Java subprojects to Nexus under /current/.'
249-
250- publishSrc = tasks. buildJavadocAll. destinationDir
251- destPath = ' current/javadocAll/'
252- }
253-
254- // We're deliberately NOT naming this task "publish", because we don't want it running when we do a:
255- // ./gradlew publish
256- // from the root directory. It simply takes too long.
257- task publishAllDocsAsVersioned(group : ' Documentation' ) {
258- description = ' Publish user guide and both Javadoc sets to Nexus under /major.minor/.'
259-
260- // Aggregates the individual "publish*" tasks.
261- dependsOn publishAsVersionedUserGuide, publishAsVersionedJavadocPublicApi,
262- publishAsVersionedJavadocPublicApiWithDeps, publishAsVersionedJavadocAll
263- }
264-
265- task publishAllDocsAsCurrent(group : ' Documentation' ) {
266- description = ' Publish user guide and both Javadoc sets to Nexus under /current/.'
267-
268- // Aggregates the individual "publish*" tasks.
269- dependsOn publishAsCurrentUserGuide, publishAsCurrentJavadocPublicApi, publishAsCurrentJavadocPublicApiWithDeps,
270- publishAsCurrentJavadocAll
271- }
272- }
273-
274- import edu.ucar.build.publishing.tasks.DeleteFromNexusTask
275-
276- // By default, this will perform a dry run, which simply prints the components that the query matched.
277- // To actually delete those components, do: ./gradlew :docs:deleteFromNexus --dryRun=false
278- task deleteVersionedDocsFromNexus (group : ' Documentation' , type : DeleteFromNexusTask ) {
279- description = ' Remove user guide and both Javadoc sets on Nexus under /major.minor/.'
280- host = ' https://artifacts.unidata.ucar.edu/'
281- searchQueryParameters. repository = ' docs-netcdf-java'
282- searchQueryParameters. group = " /$project . docVersion /*"
283-
284- onlyIf {
285- // Will be evaluated at task execution time, not during configuration.
286- // Fails the build if the specified properties haven't been provided.
287- username = getPropertyOrFailBuild NEXUS_USERNAME_KEY
288- password = getPropertyOrFailBuild NEXUS_PASSWORD_KEY
289- return true
290- }
291- }
292-
293- task deleteCurrentDocsFromNexus (group : ' Documentation' , type : DeleteFromNexusTask ) {
294- description = ' Remove user guide and both Javadoc sets on Nexus under /current/.'
295- host = ' https://artifacts.unidata.ucar.edu/'
296- searchQueryParameters. repository = ' docs-netcdf-java'
297- searchQueryParameters. group = ' /current/*'
298-
299- onlyIf {
300- // Will be evaluated at task execution time, not during configuration.
301- // Fails the build if the specified properties haven't been provided.
302- username = getPropertyOrFailBuild NEXUS_USERNAME_KEY
303- password = getPropertyOrFailBuild NEXUS_PASSWORD_KEY
304- return true
305- }
306- }
307-
308177tasks. withType(JavaCompile ). configureEach {
309178 options. encoding = ' UTF-8'
310179 // whatever java is being used to run gradle will be used to compile java classes
0 commit comments