This message was deleted.
# community-support
s
This message was deleted.
v
Can you specify how to see the problem? When I clone your project and run
./gradlew build
it complains that it uses an invalid target version. When I try again with Java 17, I get compile errors from
:micronaut-form-login:compileJava
d
intellij gives you warnings in the build tab and then does not show the tasks in the gradle tab. this is still useful feedback that i guess it is basically not visible at all if not looking
v
Ah, I see, thanks. You have plugin
io.micronaut.application
applied on
:gallery-sharer
and on
:micronaut-form-login-text
sibling projects individually. This way they end up in different class loaders and so class
GraalVMReachabilityMetadataService
is present twice, once on each class loader and incompatible as they are different class instances if they come from different class loaders. So if classes from the one want to communicate with classes from the other, you get a problem. If you make sure both projects get the classes from the same class loader by adding the classes to a common parent class loader it works. So if you for example add a
build.gradle
for the root project and put in it
Copy code
plugins {
    id 'io.micronaut.application' version '3.6.6' apply false
    id 'io.micronaut.library' version '3.6.6' apply false
    id 'com.github.johnrengelman.shadow' version '7.1.2' apply false
}
and also change the
io.micronaut.application
version in
:gallery-sharer
to be the same 3.6.6 version (or you can also leave out the version then), it works properly.
🙌 1
d
works like a charm, how did you know that they would be the same class loader if loaded up from a parent build.gradle? (anything to read up on? going to try to apply this pattern elsewhere - seems like the way i was doing it will stop working when eventually other plugins also add build services.)
v
I just know the class loader hierarchy in Gradle roughly. 🙂
✅ 1
I think there once also was a blog post about it
But you can also simply use a debugger to see where various classes come from
And the class loaders have pretty meaningful names to see the hierarchy
d
v
No, was some 3rd party blog
👀 1
d
thanks for the link and the fix
"Above that is buildSrc itself, which is the historical source of primordial evil in Gradleland." 🤣