Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom ruby extension for PDF generation #1290

Closed
kneisslm opened this issue Nov 10, 2023 · 3 comments · Fixed by #1364
Closed

Custom ruby extension for PDF generation #1290

kneisslm opened this issue Nov 10, 2023 · 3 comments · Fixed by #1364

Comments

@kneisslm
Copy link

I try to add a custom ruby extension to process a document in order to modify the title page of a PDF document.

I have added

  rubyExtensions = ['asciidoctor-pdf-extensions.rb']

in docToolchainConfig.groovy .

With docToolchain-3.0.2 I get

FAILURE: Build failed with an exception.

* Where:
Script '/Users/kneissl/.sdkman/candidates/doctoolchain/3.0.2/scripts/AsciiDocBasics.gradle' line: 246

* What went wrong:
A problem occurred evaluating script.
> Cannot set the value of read-only property 'requires' for task ':asciidoctor' of type org.asciidoctor.gradle.jvm.AsciidoctorTask.


This is very close to the issue posted by @davidschottel in #1239 (comment)_

I am really new to docToolchain so I am not yet able to apply his solution to my problem.

@cgoguyer
Copy link

I have the same issue (requires[] cannot be updated).
By the way, how to use an extension directly from ruby repository instead of copying it locally ?

dependencies {
  asciidoctorGems 'rubygems:asciidoctor-lists:1.0.9'
  asciidoctorGems 'rubygems:asciidoctor-bibliography:0.11.0'
}
...
asciidoctorj {
 ...
  requires 'asciidoctor-lists'
  requires 'asciidoctor-bibliography'
}

@cgoguyer
Copy link

cgoguyer commented Dec 5, 2023

Hi, any new for remote access to ruby repository?

@PacoVK
Copy link
Collaborator

PacoVK commented Feb 9, 2024

Thanks for bringing this up, remote access will be targeted as extra feature, for now the functionality is limited to local custom extensions only. However, i do see value in this feature, but need to prioritize :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants