File tree Expand file tree Collapse file tree 2 files changed +13
-22
lines changed
build-logic/src/main/kotlin/kotlinx/io/conventions Expand file tree Collapse file tree 2 files changed +13
-22
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,11 @@ plugins {
20
20
}
21
21
22
22
kotlin {
23
+ @OptIn(ExperimentalKotlinGradlePluginApi ::class )
24
+ compilerOptions {
25
+ allWarningsAsErrors.set(true )
26
+ freeCompilerArgs.add(" -Xexpect-actual-classes" )
27
+ }
23
28
24
29
val versionCatalog: VersionCatalog = extensions.getByType<VersionCatalogsExtension >().named(" libs" )
25
30
jvmToolchain {
@@ -33,6 +38,14 @@ kotlin {
33
38
testRuns[" test" ].executionTask.configure {
34
39
useJUnitPlatform()
35
40
}
41
+ // can be replaced with just `compilerOptions { }` in Kotlin 2.0
42
+ compilations.configureEach {
43
+ compileTaskProvider.configure {
44
+ compilerOptions {
45
+ freeCompilerArgs.add(" -Xjvm-default=all" )
46
+ }
47
+ }
48
+ }
36
49
}
37
50
38
51
js {
Original file line number Diff line number Diff line change @@ -24,28 +24,6 @@ allprojects {
24
24
}
25
25
}
26
26
27
- subprojects {
28
- tasks.withType<KotlinCompile >().configureEach {
29
- kotlinOptions {
30
- allWarningsAsErrors = true
31
- freeCompilerArgs + = " -Xjvm-default=all"
32
- freeCompilerArgs + = " -Xexpect-actual-classes"
33
- }
34
- }
35
- tasks.withType<KotlinNativeCompile >().configureEach {
36
- kotlinOptions {
37
- allWarningsAsErrors = true
38
- freeCompilerArgs + = " -Xexpect-actual-classes"
39
- }
40
- }
41
- tasks.withType<KotlinJsCompile >().configureEach {
42
- kotlinOptions {
43
- allWarningsAsErrors = true
44
- freeCompilerArgs + = " -Xexpect-actual-classes"
45
- }
46
- }
47
- }
48
-
49
27
@OptIn(ExperimentalBCVApi ::class )
50
28
apiValidation {
51
29
ignoredProjects.add(" kotlinx-io-benchmarks" )
You can’t perform that action at this time.
0 commit comments