This message was deleted.
# community-support
s
This message was deleted.
a
try changing
Copy code
implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
to
Copy code
api(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
I presume that
build-logic/kotlin-library/build.gradle.kts
defines a dependency like this?
Copy code
implementation(project(":commons"))
t
Sadly, tried api instead of implementation, but no luck. Yes, that dependency is declared indeed
a
ah yes, I see it now in your snippet
I think you’re just going to have to declare the dependency twice
Copy code
implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
t
into
kotlin-library/build.gradle.kts
i suppose, already tried that too 😬
v
No matter what you try, my hack-around will simply not work in that situation for the same reason you also cannot use it within
plugin { ... }
blocks.
The
plugins { ... }
block is extracted and applied to a dummy project to determine which type-safe accessors to generate.
In that dummy project the
LibrariesForLibs
is not present, but it is an essential part of the hack-around that the exact same version catalog is present on the project where you apply it as it on the project where you build the convention plugin.
And exactly that invariant is not given if you apply the one convention plugin inside the
plugins { ... }
block of the other one.
t
Ok I get it! Crystal clear as always, thanks for the explanation 👍
👌 1