Skip to content

Commit 4417244

Browse files
committed
Build's working again
1 parent 6f56e57 commit 4417244

File tree

3 files changed

+10
-14
lines changed

3 files changed

+10
-14
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,11 @@ concurrency:
1717

1818
jobs:
1919
build:
20-
name: 'KSP ${{ matrix.ksp_enabled }} / K2 ${{ matrix.k2_enabled }}'
20+
name: 'KSP ${{ matrix.ksp_enabled }}
2121
runs-on: ubuntu-latest
2222
strategy:
2323
matrix:
2424
ksp_enabled: [ true, false ]
25-
k2_enabled: [ true, false ]
2625
fail-fast: false
2726
2827
steps:
@@ -39,7 +38,7 @@ jobs:
3938
uses: gradle/actions/setup-gradle@v4
4039

4140
- name: Build project
42-
run: ./gradlew build check -Pmoshix.useKsp=${{ matrix.ksp_enabled }} -Pkotlin.experimental.tryK2=${{ matrix.k2_enabled }} --quiet
41+
run: ./gradlew build check -Pmoshix.useKsp=${{ matrix.ksp_enabled }} --quiet
4342

4443
publish-snapshot:
4544
needs: 'build'

build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ spotless {
7676
subprojects {
7777
pluginManager.withPlugin("java") {
7878
// javaReleaseVersion can be set to override the global version
79+
// Can't use providers.gradleProperty() because it doesn't work on subprojects
7980
val jvmTargetProvider =
80-
providers
81-
.gradleProperty("moshix.javaReleaseVersion")
81+
provider<String> { findProperty("moshix.javaReleaseVersion") as? String? }
8282
.orElse(libs.versions.jvmTarget)
8383
.map(String::toInt)
8484
configure<JavaPluginExtension> {

moshi-ir/moshi-kotlin-tests/build.gradle.kts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ plugins {
2222
alias(libs.plugins.ksp)
2323
}
2424

25+
kotlin.compilerOptions.optIn.add("kotlin.ExperimentalStdlibApi")
26+
2527
moshi { enableSealed.set(true) }
2628

2729
val proguardRuleValidator =
@@ -38,15 +40,10 @@ val proguardRuleValidator =
3840
}
3941
}
4042

41-
tasks.withType<KotlinCompile>().configureEach {
42-
compilerOptions { freeCompilerArgs.addAll("-opt-in=kotlin.ExperimentalStdlibApi") }
43-
if (
44-
name == "compileTestKotlin" &&
45-
providers.gradleProperty("kotlin.experimental.tryK2").orNull != "true"
46-
) {
47-
finalizedBy(proguardRuleValidator)
48-
}
49-
}
43+
tasks
44+
.withType<KotlinCompile>()
45+
.named { it == "compileTestKotlin" }
46+
.configureEach { finalizedBy(proguardRuleValidator) }
5047

5148
dependencies {
5249
testImplementation("junit:junit:4.13.2")

0 commit comments

Comments
 (0)