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 {
2020}
2121
2222kotlin {
23+ @OptIn(ExperimentalKotlinGradlePluginApi ::class )
24+ compilerOptions {
25+ allWarningsAsErrors.set(true )
26+ freeCompilerArgs.add(" -Xexpect-actual-classes" )
27+ }
2328
2429 val versionCatalog: VersionCatalog = extensions.getByType<VersionCatalogsExtension >().named(" libs" )
2530 jvmToolchain {
@@ -33,6 +38,14 @@ kotlin {
3338 testRuns[" test" ].executionTask.configure {
3439 useJUnitPlatform()
3540 }
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+ }
3649 }
3750
3851 js {
Original file line number Diff line number Diff line change @@ -24,28 +24,6 @@ allprojects {
2424 }
2525}
2626
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-
4927@OptIn(ExperimentalBCVApi ::class )
5028apiValidation {
5129 ignoredProjects.add(" kotlinx-io-benchmarks" )
You can’t perform that action at this time.
0 commit comments