eliminate the dependency on the generated-docs repository
- add and register Antora Collector - configure Antora Collection at runtime using another extension
This commit is contained in:
committed by
Steve Riesenberg
parent
6bd10b4056
commit
f2f7eb7482
@@ -0,0 +1,28 @@
|
||||
'use strict'
|
||||
|
||||
const BASE_COMMAND = 'gradlew -PbuildSrc.skipTests=true'
|
||||
const JVM_ARGS='-Xmx3g -XX:+HeapDumpOnOutOfMemoryError'
|
||||
const REPO_URL = 'https://github.com/spring-projects/spring-security'
|
||||
const TASK_NAME=':spring-security-docs:generateAntora'
|
||||
|
||||
module.exports.register = function () {
|
||||
this.once('contentAggregated', ({ contentAggregate }) => {
|
||||
for (const { origins } of contentAggregate) {
|
||||
for (const origin of origins) {
|
||||
if (origin.url === REPO_URL && origin.descriptor.ext?.collector === undefined) {
|
||||
origin.descriptor.ext = {
|
||||
collector: {
|
||||
run: {
|
||||
command: `${BASE_COMMAND} "-Dorg.gradle.jvmargs=${JVM_ARGS}" ${TASK_NAME}`,
|
||||
local: true,
|
||||
},
|
||||
scan: {
|
||||
dir: './build/generateAntora',
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user