@@ -61,6 +61,10 @@ sourceSets {
61
61
val adapter34 by creating {
62
62
compileClasspath + = adapter.output
63
63
}
64
+ val adapter34Test by creating {
65
+ compileClasspath + = adapter.output + adapter34.output
66
+ runtimeClasspath + = adapter.output + adapter34.output
67
+ }
64
68
val adapter41 by creating {
65
69
compileClasspath + = adapter.output
66
70
}
@@ -107,6 +111,14 @@ tasks.named<Jar>("shadowJar") {
107
111
this .from(adapterSources.map { sourceSet -> sourceSet.map { it.output.classesDirs } })
108
112
}
109
113
114
+ val test34Task = tasks.register<Test >(" test34" ) {
115
+ classpath = sourceSets.named(" adapter34Test" ).get().runtimeClasspath
116
+ testClassesDirs = sourceSets.named(" adapter34Test" ).get().output.classesDirs
117
+ }
118
+ tasks.named(" test" ) {
119
+ dependsOn(test34Task)
120
+ }
121
+
110
122
dependencies {
111
123
compileOnly(gradleApi())
112
124
compileOnly(libs.ktlint.core)
@@ -119,12 +131,12 @@ dependencies {
119
131
add(" adapter46CompileOnly" , " com.pinterest.ktlint:ktlint-core:0.46.1" )
120
132
add(" adapter47CompileOnly" , " com.pinterest.ktlint:ktlint-core:0.47.1" )
121
133
add(" adapter48CompileOnly" , " com.pinterest.ktlint:ktlint-core:0.48.2" )
122
- // add("adapter49CompileOnly", "com.pinterest.ktlint:ktlint-rule-engine-core:0.49.0")
134
+ // add("adapter49CompileOnly", "com.pinterest.ktlint:ktlint-rule-engine-core:0.49.0")
123
135
add(" adapter49CompileOnly" , " com.pinterest.ktlint:ktlint-core:0.49.1" )
124
136
add(" adapter49CompileOnly" , " com.pinterest.ktlint:ktlint-cli-reporter:0.49.1" )
125
137
add(" adapter49CompileOnly" , " com.pinterest.ktlint:ktlint-rule-engine:0.49.1" )
126
138
add(" adapter49CompileOnly" , " com.pinterest.ktlint:ktlint-ruleset-standard:0.49.1" )
127
- add(" adapter49CompileOnly" ," com.pinterest.ktlint:ktlint-reporter-baseline:0.49.1" )
139
+ add(" adapter49CompileOnly" , " com.pinterest.ktlint:ktlint-reporter-baseline:0.49.1" )
128
140
compileOnly(libs.kotlin.gradle.plugin)
129
141
compileOnly(libs.android.gradle.plugin)
130
142
compileOnly(kotlin(" stdlib-jdk8" ))
@@ -146,6 +158,12 @@ dependencies {
146
158
testImplementation(libs.kotlin.reflect)
147
159
testImplementation(libs.ktlint.core)
148
160
testImplementation(libs.archunit.junit5)
161
+
162
+ add(" adapter34TestImplementation" , " com.pinterest.ktlint:ktlint-core:0.34.0" )
163
+ add(" adapter34TestImplementation" , gradleTestKit())
164
+ add(" adapter34TestImplementation" , libs.junit.jupiter)
165
+ add(" adapter34TestImplementation" , libs.assertj.core)
166
+ add(" adapter34TestImplementation" , libs.kotlin.reflect)
149
167
}
150
168
151
169
// Test tasks loods plugin from local maven repository
0 commit comments