Could not get unknown property 'Orientation'
ceduliocezar opened this issue ยท comments
๐ Describe the bug
Not able to define all properties listed on the documentation.
โ ๏ธ Current behavior
Whenever I sync my project with your plugin applied or execute the gradle task createModuleGraph i get the error:
Build file 'myproject/build.gradle' line: 148
A problem occurred evaluating root project 'myproject'.
> Could not get unknown property 'Orientation' for extension 'moduleGraphConfig' of type dev.iurysouza.modulegraph.gradle.ModuleGraphExtension.
if i comment the orientation it generate correctly.
โ Expected behavior
I am able to define all the properties available.
๐ฃ Steps to reproduce
- Add maven to root build.gradle.
maven {
url = uri("https://plugins.gradle.org/m2/")
}
- Apply the plugin
plugins {
id "dev.iurysouza.modulegraph" version "0.5.0"
}
- Configure the plugin on root build.gradle
moduleGraphConfig {
readmePath.set("./README.md")
heading.set("### Dependency Diagram")
showFullPath.set(false) // optional
orientation.set(Orientation.TOP_TO_BOTTOM) //optional
//linkText.set(LinkText.NONE) // optional
//theme.set(Theme.NEUTRAL) // optional
// or you can fully customize it by using the BASE theme:
// theme.set(Theme.BASE(
// mapOf(
// "primaryTextColor" to "#fff",
// "primaryColor" to "#5a4f7c",
// "primaryBorderColor" to "#5a4f7c",
// "lineColor" to "#f5a623",
// "tertiaryColor" to "#40375c",
// "fontSize" to "11px"
// )
// )
// )
}
- Run the gradle task createModuleGraph or sync the project
The same is hapenning for linkText and theme.
I figured out the problem.
Apparently you need to import those Orientation and the classes to be able to use them.
Somehow the message was a bit misleading.
So either use directly the full name with package or import the classes at the top of the gradle file.
@iurysza maybe consider changing the readme documentation to include the package name there, it took me sometime to realise what was missing.
Thanks for the feedback @ceduliocezar! I'll update the README!