Slackbot
02/15/2023, 6:34 PMtony
02/15/2023, 6:37 PMMyTask and MyTask_Decorated (the latter of which gradle creates at build runtime with bytecode magic) are probably getting loaded into different classloaders and can't "see" each otherJohn
02/15/2023, 6:42 PMtony
02/15/2023, 6:50 PMtony
02/15/2023, 6:50 PMJohn
02/15/2023, 6:54 PMJohn
02/15/2023, 6:55 PMJohn
02/15/2023, 7:01 PMCaused by: java.lang.ClassCastException: Failed to cast object task ':aggregateLibraryMetadataFiles' of type com.grubhub.gradle.grublish.common.AggregateLibraryMetadataTask_Decorated to target type com.grubhub.gradle.grublish.common.AggregateLibraryMetadataTask
at org.gradle.internal.Cast.cast(Cast.java:41)
at org.gradle.internal.Transformers$CastingTransformer.transform(Transformers.java:63)
at com.grubhub.gradle.grublish.common.AggregateLibraryMetadataTask$Companion.apply(AggregateLibraryMetadataTask.kt:67)
at com.grubhub.garcon.buildplugin.grublish.impl.GrublishLibPlugin.apply(GrublishLibPlugin.kt:44)
at com.grubhub.garcon.buildplugin.grublish.impl.GrublishLibPlugin.apply(GrublishLibPlugin.kt:15)
here is my real stacktraceJohn
02/15/2023, 7:01 PMJohn
02/15/2023, 7:02 PMmaybeCreate function as seen here: https://gradle-community.slack.com/archives/CAD95CR62/p1676424003705409John
02/15/2023, 7:03 PMtony
02/15/2023, 7:03 PMJohn
02/15/2023, 7:03 PMtony
02/15/2023, 7:04 PMJohn
02/15/2023, 7:04 PMJohn
02/15/2023, 7:04 PMtony
02/15/2023, 7:04 PMJohn
02/15/2023, 7:05 PMtony
02/15/2023, 7:05 PMJohn
02/15/2023, 7:06 PMJohn
02/15/2023, 7:06 PMtony
02/15/2023, 7:06 PMThing::class.java.classLoader and dig into itJohn
02/15/2023, 7:06 PMJohn
02/15/2023, 7:06 PMtony
02/15/2023, 7:06 PM-Dorg.gradle.debug=true + IDEA and Remote JVM Debug run configurationtony
02/15/2023, 7:06 PMJohn
02/15/2023, 7:08 PMJohn
02/16/2023, 4:02 PMJohn
02/16/2023, 9:01 PM