Browse Source
- add and register Antora Collector - configure Antora Collection at runtime using another extensionpull/11874/head
4 changed files with 36 additions and 7 deletions
@ -0,0 +1,28 @@
@@ -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', |
||||
}, |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
}) |
||||
} |
||||
Loading…
Reference in new issue