Posts

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

Getting started with Gradle-Grovvy language foundation

Image
  Why learn Grovvy The official recommended language of Gradle is Groovy, which is a jvm language. If you want to perform plug-in modules, hot repairs, complex construction systems, etc., you need a little understanding of Groovy. You don't need to learn the details of Groovvy. Generally, the benefits are too great. Low, like bloggers only use Gradle to build SpringBoot, and the main project language is not Groovy. There are quite a few Gradle users who have no basic concepts at all. Whenever they encounter a need or problem, they need to find it online. This is a misunderstanding. Gradle is not just a configuration script, I personally think that behind it is a combination of two languages: Groovy Language + Gradle DSL The DSL part can also be expanded. If you are using the Android ecosystem, there will also be Android DSL, a total of three. The full name of DSL is Domain Specific Language, that is, "domain specific language", which means that this language is not univer