Gradle configuration Spring multi-project test
For projects with multiple Gradle projects, if the main project is executing unit test, other sub-projects will be executed together, and some advanced settings are required. First refer to another article, use eclipse to configure two SpringBoot projects: lab-springboot, library1. Gradle references the level project First, modify the build.gradle of library1 and add these codes at the bottom of the file: configurations { // Gradle DSL // The names of the configurations which this configuration extends from. testOutput.extendsFrom (testImplementation) } task jarTest (type: Jar, dependsOn: testClasses) { from sourceSets.test.output classifier = 'test' // The classifier distinguishes different artifacts build from the same project. } artifacts { testOutput jarTest } Then modify the build.gradle of lab-springboot and add these codes at the bottom of the file. Note that there may be other codes in the dependencies: dependencies { im