I’m working on a project which consists of two subprojects. A client JavaFX front end, and a Spring boot backend subproject. I’d like the JFX project to be able to start up the Spring Boot application in the background, and also refer to the backend project to share some common code. Unless I just have some odd local problem, the backend Spring Boot dependency (plugin) seems to be actually getting in the way of the dependent (JFX) project from resolving anything in the backend/core (boot) project.
I’m linking to a public GitLab repo which I hope should demonstrate this with a minimal example. Anyone trying it would need to reverse the commented out plugins blocks in the “core” backend project as shown here:
plugins {
id 'java'
}
//plugins {
// id 'java'
// id 'org.springframework.boot' version '2.4.5'
//}
//
//bootJar {
// manifest {
// attributes 'Main-Class': 'org.example.CoreMain'
// }
//}
I’m doing a “gradlew clean build run”.
With only the java plugin included, it builds and runs fine. If I swap the two, the dependent project can’t build at all since it relies on a class in core.
So is this more of a Spring Boot plugin problem, more of a Gradle problem, or something I’ve done wrong?