Attempt to fix Windows build error with Antora

See gh-33766
This commit is contained in:
Phillip Webb 2024-03-21 14:12:22 -07:00
parent edfc5f66c2
commit 75012c5173
3 changed files with 11 additions and 6 deletions

View File

@ -72,7 +72,7 @@ jobs:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }}
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
run: ./gradlew build ${{ runner.os == 'Windows' && '--exclude-task antora' || ''}}
run: ./gradlew build
- name: Send notification
uses: ./.github/actions/send-notification
if: always()

View File

@ -141,8 +141,9 @@ public class AntoraConventions {
if (project.getGradle().getStartParameter().getLogLevel() != LogLevel.DEBUG) {
antoraExtension.getOptions().add("--quiet");
}
antoraExtension.getOptions().addAll("--stacktrace");
antoraExtension.getOptions().addAll("--log-level", "all");
else {
antoraExtension.getOptions().addAll("--log-level", "all");
}
}
private void configureNodeExtension(Project project, NodeExtension nodeExtension) {

View File

@ -294,9 +294,13 @@ def antoraRootAggregateContent = tasks.register("antoraRootAggregateContent", Zi
}
from(project.configurations.configurationProperties) {
eachFile {
it.path = it.file.toString()
.replaceFirst('/build/(?:classes|resources)/java/main/', '/')
.replaceFirst('^.*/([^/]+)/META-INF/(spring-configuration-metadata\\.json)$', 'modules/ROOT/partials/$1/$2')
it.path = rootProject
.projectDir
.toPath()
.relativize(it.file.toPath())
.toString()
.replace('\\', '/')
.replaceAll('.*\\/([^\\/]+)\\/build.*', 'modules/ROOT/partials/$1/spring-configuration-metadata.json')
}
}
from(runRemoteSpringApplicationExample) {