Никита Гучаков
05/28/2025, 7:19 PMVampire
05/28/2025, 9:11 PMbuildSrc
• instead have an included build like build-logic
• have an additional included build like repo-conf
that does not have dependencies and thus does not need a repository
• in repo-conf
define a settings plugin that sets the repo as plugin repo and dependency repo
• include repo-conf
in build-logic
and the main build and apply the settings plugin in bothVampire
05/28/2025, 9:16 PMbuild-logic
build and make sure it is also added to the classpath of the main build's settings script
• If you need furhter settings plugins from those Nexus repos in your build-logic
build, you probably need yet another build where you depend on those and then use that to get the plugins to the `build-logic`'s settings classpathНикита Гучаков
05/29/2025, 4:44 AMНикита Гучаков
05/30/2025, 5:17 PMVampire
05/30/2025, 5:39 PMbuildSrc
is anyway almost equal to an included build, just some subtle differences.
One is, that buildSrc
uses a default build script that applies the kotlin-dsl
plugin if you do not have an explicit one.
That plugin is the one making precompiled Kotlin DSL script plugins possible, just apply it and it should work, unless something else is wrong.
Btw. you should have a dot somewhere. Plugin IDs without dot should only be used by built-in plugins to reduce risk of clashes.Никита Гучаков
05/31/2025, 11:30 AMНикита Гучаков
05/31/2025, 11:43 AMapply(from = "src/main/kotlin/com/example/repo-configuration-plugin.settings.gradle.kts")
don't know if there is better approach availableVampire
05/31/2025, 1:11 PMSo kinda I have to add repos at those repo-conf, so they still will be duplicated with repos at repos-conf plugin I guess?Well, if you want to use Kotlin DSL precompiled script plugins there, I guess so. My premise was, that you do the bottom-most repo-configuring plugin without the need for any 3rd-parts dependencies and thus no repositories. So you would probably there have to develop that plugin in plain Java.
Vampire
05/31/2025, 1:12 PMdon't know if there is better approach availableThose (things you use with "apply from") are called legacy script plugins. They have many quirks and are highly discouraged. I wouldn't recommend using them.