Skip to content

Support for centralized repositories declaration

We follow the following instructions by the gradle-node-plugin to allow our project to use the RepositoriesMode.FAIL_ON_PROJECT_REPOS repositories mode: https://github.com/node-gradle/gradle-node-plugin/blob/master/docs/faq.md#is-this-plugin-compatible-with-centralized-repositories-declaration

AntoraPlugin.java seems to expect getDistBaseUrl to always return a non-null value:

} else if (!dists.exists() || isOlderThanOneDay(dists.lastModified())) {
    download(new URL(node.getDistBaseUrl().get() + "/index.json"), dists);
}

Producing the following error during configuration:

08:11:28  Caused by: org.gradle.api.internal.provider.MissingValueException: Cannot query the value of extension 'node' property 'distBaseUrl' because it has no value available.
08:11:28  	at org.gradle.api.internal.provider.AbstractMinimalProvider.calculateOwnPresentValue(AbstractMinimalProvider.java:74)
08:11:28  	at org.gradle.api.internal.provider.AbstractMinimalProvider.get(AbstractMinimalProvider.java:92)
08:11:28  	at org.antora.gradle.AntoraPlugin.setNodeVersion(AntoraPlugin.java:273)
08:11:28  	at org.antora.gradle.AntoraPlugin.lambda$apply$0(AntoraPlugin.java:70)
08:11:28  	at org.gradle.configuration.internal.DefaultUserCodeApplicationContext$CurrentApplication$1.execute(DefaultUserCodeApplicationContext.java:123)
08:11:28  	at org.gradle.configuration.internal.DefaultListenerBuildOperationDecorator$BuildOperationEmittingAction$1.run(DefaultListenerBuildOperationDecorator.java:171)

Is there a way to overcome this?

Edited by roded
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information