File tree Expand file tree Collapse file tree 3 files changed +32
-58
lines changed
Expand file tree Collapse file tree 3 files changed +32
-58
lines changed Original file line number Diff line number Diff line change 11import kotlinx.kover.gradle.plugin.dsl.AggregationType
22import kotlinx.kover.gradle.plugin.dsl.CoverageUnit
3- import org.jetbrains.kotlin.gradle.dsl.JvmTarget
4- import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
53
64plugins {
7- alias(libs.plugins.kotlin)
85 alias(libs.plugins.kotlin.spring)
96
107 alias(libs.plugins.spring.dependencyManagement)
@@ -19,16 +16,6 @@ plugins {
1916group = " pro.qyoga"
2017version = " 0.0.1-SNAPSHOT"
2118
22- java {
23- toolchain {
24- languageVersion.set(JavaLanguageVersion .of(21 ))
25- }
26- }
27-
28- repositories {
29- mavenCentral()
30- }
31-
3219dependencies {
3320 implementation(kotlin(" reflect" ))
3421 implementation(" org.springframework.boot:spring-boot-starter-data-jdbc" )
@@ -99,24 +86,10 @@ dependencies {
9986 }
10087}
10188
102- tasks.withType<KotlinCompile > {
103- kotlin {
104- compilerOptions {
105- freeCompilerArgs = listOf (" -Xjsr305=strict" , " -Xjvm-default=all" , " -Xwhen-guards" )
106- jvmTarget.set(JvmTarget .JVM_21 )
107- }
108- }
109- }
110-
11189tasks.getByName< org.springframework.boot.gradle.tasks.bundling.BootJar > (" bootJar" ) {
11290 this .archiveFileName.set(" qyoga.jar" )
11391}
11492
115- tasks.withType<Test > {
116- this .systemProperty(" file.encoding" , " utf-8" )
117- useJUnitPlatform()
118- }
119-
12093kover {
12194 currentProject {
12295 createVariant(" Endpoints" ) {
Original file line number Diff line number Diff line change 1+ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2+ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
3+
14plugins {
25 alias(libs.plugins.kotlin) apply false
36 alias(libs.plugins.spring.dependencyManagement) apply false
47 alias(libs.plugins.spring.boot) apply false
58}
69
10+ // Почему-то внутри subprojects libs не доступен
11+ val kotlinPlugin = libs.plugins.kotlin.asProvider().get().pluginId
12+
13+ subprojects {
14+ apply (plugin = kotlinPlugin)
15+
16+ repositories {
17+ mavenCentral()
18+ }
19+
20+ configure<JavaPluginExtension > {
21+ toolchain {
22+ languageVersion.set(JavaLanguageVersion .of(21 ))
23+ }
24+ }
25+
26+ tasks.withType<KotlinCompile > {
27+ compilerOptions {
28+ freeCompilerArgs = listOf (" -Xjsr305=strict" , " -Xjvm-default=all" , " -Xwhen-guards" )
29+ jvmTarget.set(JvmTarget .JVM_21 )
30+ }
31+ }
32+
33+ tasks.withType<Test > {
34+ this .systemProperty(" file.encoding" , " utf-8" )
35+ useJUnitPlatform()
36+ }
37+
38+ }
Original file line number Diff line number Diff line change 1- import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2- import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
3-
4- plugins {
5- alias(libs.plugins.kotlin)
6- }
7-
81group = " pro.qyoga.e2e-tests"
92version = " 0.0.1-SNAPSHOT"
103
11- java {
12- toolchain {
13- languageVersion.set(JavaLanguageVersion .of(21 ))
14- }
15- }
16-
17- repositories {
18- mavenCentral()
19- }
20-
214dependencies {
225 implementation(platform(" org.springframework.boot:spring-boot-dependencies:${libs.versions.springBoot.get()} " ))
236
@@ -29,20 +12,6 @@ dependencies {
2912 testImplementation(testLibs.testcontainers.selenium)
3013}
3114
32- tasks.withType<KotlinCompile > {
33- kotlin {
34- compilerOptions {
35- freeCompilerArgs = listOf (" -Xjsr305=strict" , " -Xjvm-default=all" )
36- jvmTarget.set(JvmTarget .JVM_21 )
37- }
38- }
39- }
40-
41- tasks.withType<Test > {
42- this .systemProperty(" file.encoding" , " utf-8" )
43- useJUnitPlatform()
44- }
45-
4615tasks {
4716 named(" test" , Test ::class ) {
4817 systemProperties[" selenide.browser" ] = " chrome"
You can’t perform that action at this time.
0 commit comments