I have an application with a Gradle module structure similar to this:
app - applies warcommon/utilitiescommon/authetc.
The app module applies the WAR plugin. When deployed to a remote server, this exception comes back:
Caused by: java.lang.TypeNotPresentException: Type [SomeClass] not present
at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:117)
at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:125)
at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
at sun.reflect.generics.visitor.Reifier.reifyTypeArguments(Reifier.java:68)
at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:138)
at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
at sun.reflect.generics.repository.ClassRepository.getSuperclass(ClassRepository.java:90)
at java.lang.Class.getGenericSuperclass(Class.java:777)
at org.kodein.di.TypeReference.<init>(types.kt:272)
Clearly, classes from depended-on modules are not being brought into the WAR somehow (which is exposed via Kodein service locator usage) - this is not intuitive since that wouldn't be the case if it was packaged into a JAR or AAR.
Anyone know why this may be happening and how I can change my Gradle configuration to fix it?
Edit: if I expand the WAR, I see external Maven dependencies are brought into lib as JARs along with non-app modules. All of the compiled Kotlin classes from the app module are in classes. I guess it's not working because the main app JAR is not bringing in the module JARs, for some reason.