Skip to content

Commit

Permalink
Fix antora build on docs-build
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatan-ivanov committed Sep 26, 2023
1 parent f77df56 commit 7f4e618
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 16 deletions.
16 changes: 13 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ buildscript {

dependencies {
classpath 'gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin:0.16.1'
classpath 'com.netflix.nebula:nebula-release-plugin:17.1.0'
classpath 'com.netflix.nebula:nebula-publishing-plugin:20.1.0'
classpath 'com.netflix.nebula:nebula-project-plugin:10.1.2'
classpath 'com.netflix.nebula:nebula-release-plugin:17.2.2'
classpath 'com.netflix.nebula:nebula-publishing-plugin:20.3.0'
classpath 'com.netflix.nebula:nebula-project-plugin:10.1.5'
classpath 'com.netflix.nebula:gradle-info-plugin:12.1.6'
classpath 'io.spring.nohttp:nohttp-gradle:0.0.11'
classpath 'io.github.gradle-nexus:publish-plugin:1.3.0'
classpath 'me.champeau.gradle:japicmp-gradle-plugin:0.4.1'
Expand All @@ -33,6 +34,15 @@ buildscript {
configurations.classpath.resolutionStrategy.cacheDynamicVersionsFor 0, 'minutes'
}

// Antora uses worktrees to check out branches/tags.
// The nebula release, project, and info plugins use jgit to fetch git-related info.
// Unfortunately jgit does not support worktrees: https://bugs.eclipse.org/bugs/show_bug.cgi?id=477475
// TODO: remove this hack once jgit supports worktrees and nebula upgrades.
if (project.hasProperty('antora')) {
'git fetch --unshallow --all --tags'.execute().text // antora shallow-clones so there is no history
ext['git.root'] = 'git rev-parse --path-format=absolute --git-common-dir'.execute().text.trim()
}

// TODO: remove this hack, see: https://github.com/nebula-plugins/nebula-release-plugin/issues/213
def releaseStage = findProperty('release.stage')
apply plugin: 'com.netflix.nebula.release'
Expand Down
25 changes: 13 additions & 12 deletions buildscript-gradle.lockfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/antora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ nav:
ext:
collector:
run:
command: ./gradlew -q -PbuildSrc.skipTests=true "-Dorg.gradle.jvmargs=-Xmx3g -XX:+HeapDumpOnOutOfMemoryError" :docs:generateAntoraResources
command: gradlew -q -PbuildSrc.skipTests=true -Pantora "-Dorg.gradle.jvmargs=-Xmx3g -XX:+HeapDumpOnOutOfMemoryError" :docs:generateAntoraResources
local: true
scan:
dir: ./build/generated-antora-resources
Expand Down

0 comments on commit 7f4e618

Please sign in to comment.