Read the variables from Maven/Gradle plugin
See original GitHub issueI use the plugin and the Maven plugin.
I defined some variables in the Maven plugin, e.g. sources_path, I only write sources_path and the Java class filename when I include some source codes. Then the Maven plugin can deal with the document.
But the plugin does not deal with the variables, so it does not show the code when I open the preview.
Could it read the variables from Maven/Gradle plugin?
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
In gradle, how to use a variable for a plugin version?
As of Gradle 5.6, you can declare your plugin versions in the gradle.properties file, and reference these properties in plugins block.
Read more >Using Gradle Plugins
See plugin version management if you want to use a variable to define a plugin version. ... This tells Gradle to first look...
Read more >Maven Publish Plugin - Gradle User Manual
The Maven Publish Plugin provides the ability to publish build artifacts to an Apache Maven repository. A module published to a Maven repository...
Read more >The Java Plugin - Gradle User Manual
The Java plugin adds Java compilation along with testing and bundling capabilities to a project. It serves as the basis for many of...
Read more >The Signing Plugin - Gradle User Manual
The Signing Plugin currently only provides support for generating OpenPGP signatures (which is the signature format required for publication to the Maven ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I mark this issue as a “help wanted”. I as a maintainer am willing to help anyone who wants to take up this task.
The current functionality around finding attributes inside the current project is within the class AsciiDocUtil.findAttributes(). Some search the whole file, some search attribute relevant to the selected PsiElement (that usually means the current file).
One first approach could be:
The AsciiDocUtil.collectAntoraAttributes() take a similar approach to collect attributes specific to Antora.
Further improvements could include (not necessarily in the first iteration):
${project.build.sourceDirectory}), these could be replacedsourcedir. Given some evaluation, it might make sense to restrict attributes declared in the maven module to files in that source directory. Please discuss.Again, I’m willing to support everyone who wants to take up this task. The Contributor’s Guide for Coders contains information how to setup a coding environment for this plugin.
@ahus1 It is a great solution. Thanks a lot!
The best solution might take time. But the trade-off solution is already a huge improvement. Thank you again.