Slackbot
12/11/2023, 2:00 AMAdam
12/11/2023, 8:29 AM.kt file, then you'll be able to import and use them.Vampire
12/11/2023, 10:03 AM.kt file to be able to use it, or instead work with adding extensions on which you call their functions.
2. Your function will not work in its current state. You define it as extension function of SonarExtension, so to call it you would after the move do sonarqube { setProjectKey(...) }. Your context is the extension already, so you need to remove the sonarqube { ... } from the function.Vampire
12/11/2023, 10:06 AMafterEvaluate { ... } and so on.Seokjae Lee
12/11/2023, 11:49 AM.kt file, and imported it from the submodule's build.gradle.kts, and it works 👍
I have a few more questions. I'm new to this, so there's a lot I'm not sure about 😅
1. Is using afterEvaluate { ... } an anti-pattern? Is there any explanation or reference for this?
2. I'm curious about the identity of the Convention_project_gradle I mentioned in the previous thread. Do you know somewhere I can check the Javadoc for this class?
3. The structure I created works, but I'm not sure if it's a commonly used structure. Do you have any recommendations for sample projects that use the Convention Plugins?Vampire
12/12/2023, 10:22 AMSwingUtilities.invokeLater or Platform.runLater to "fix" a GUI bug. You should avoid it whereever possible. There are some rare cases like when a plugin itself uses it and you have to delay to thereafter for some reason, or when you need to bridge new lazy APIs to old eager APIs in some cases. But it is always preferable to not use it.
re 2. convention.project.gradle.kts => Convention_project_gradle class
foo.bar.gradle.kts => Foo_bar_gradle class
It is just the compilation result of the Kotlin Script and nothing you should ever care about directly.
Consider this an implementation detail you should never rely on directly.
re 3. Having such an extension function that you then use is not really a convention plugin. Convention plugins are plugins that you apply to your projects and that do some plugin application and configuration - establishing your conventions. These can be plain old normal plugins, precompiled script plugins, or whatever. They can be in buildSrc or an included build or published, ...
There are many projects out there that use convention plugins. But it always depends on what you need. Even some of the projects generated by the init task contain convention plugins.Seokjae Lee
12/15/2023, 3:34 AM