gradle.startParameter.showStacktrace = ShowStacktrace.ALWAYS buildscript { ext { // ext.mavenRepo = 'http://localhost:18081/repository/maven-central/' springBootVersion = '2.6.6' // '3.0.1' springCloudVersion = '2021.0.1' // '2022.0.0' liquibaseCoreVersion = '3.8.9' liquibasePluginVersion = '2.1.1' logbackVersion = '1.2.9' jacksonVersion = '2.11.0' validationApiVersion = '2.0.1.Final' hibernateValidator = '6.2.0.Final' jakartaValidation = '2.0.2' } repositories { mavenCentral() //maven { // allowInsecureProtocol true // url mavenRepo //} } dependencies { classpath "org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}" classpath "org.liquibase:liquibase-gradle-plugin:${liquibasePluginVersion}" } } subprojects { apply plugin: 'java' apply plugin: 'org.springframework.boot' apply plugin: 'io.spring.dependency-management' group = 'me.bvn13.service' version = '0.0.1' sourceCompatibility = 17 targetCompatibility = 17 dependencyManagement { imports { mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}" } } tasks.withType(JavaCompile) { options.encoding = 'UTF-8' } configurations { compileOnly { extendsFrom annotationProcessor } } repositories { mavenCentral() //maven { // allowInsecureProtocol true // url mavenRepo //} } //------------------- Настройка интеграционных тестов (start) --------------------- sourceSets { integrationTest { java { compileClasspath += sourceSets.main.output runtimeClasspath += sourceSets.main.output compileClasspath += sourceSets.test.output runtimeClasspath += sourceSets.test.output srcDir file('src/integration-test/java') } resources.srcDir file('src/integration-test/resources') } } configurations { integrationTestImplementation.extendsFrom testImplementation integrationTestRuntimeOnly.extendsFrom testRuntimeOnly } task integrationTest(type: Test) { testClassesDirs = sourceSets.integrationTest.output.classesDirs classpath = sourceSets.integrationTest.runtimeClasspath outputs.upToDateWhen { false } } check.dependsOn integrationTest integrationTest.mustRunAfter test //------------------- Настройка интеграционных тестов (end) --------------------- dependencies { implementation 'org.springframework.boot:spring-boot-starter' compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' testImplementation('org.springframework.boot:spring-boot-starter-test') { exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' } testCompileOnly "org.projectlombok:lombok" testAnnotationProcessor("org.projectlombok:lombok") testImplementation 'org.assertj:assertj-core' testImplementation 'org.mockito:mockito-core' } test { useJUnitPlatform() systemProperties System.properties // Нужно, иначе Jacoco не работает systemProperties['user.dir'] = workingDir } integrationTest { useJUnitPlatform() systemProperties System.properties } } // Task to download all dependencies for all targets task downloadDependencies { doLast { rootProject.allprojects { project -> Set configurations = project.buildscript.configurations + project.configurations configurations.findAll { c -> c.canBeResolved } .forEach { c -> c.resolve() } } } }