File tree Expand file tree Collapse file tree 3 files changed +10
-14
lines changed
moshi-ir/moshi-kotlin-tests Expand file tree Collapse file tree 3 files changed +10
-14
lines changed Original file line number Diff line number Diff line change @@ -17,12 +17,11 @@ concurrency:
17
17
18
18
jobs :
19
19
build :
20
- name : ' KSP ${{ matrix.ksp_enabled }} / K2 ${{ matrix.k2_enabled }} '
20
+ name : ' KSP ${{ matrix.ksp_enabled }}
21
21
runs-on: ubuntu-latest
22
22
strategy:
23
23
matrix:
24
24
ksp_enabled: [ true, false ]
25
- k2_enabled : [ true, false ]
26
25
fail-fast: false
27
26
28
27
steps:
39
38
uses : gradle/actions/setup-gradle@v4
40
39
41
40
- 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
43
42
44
43
publish-snapshot :
45
44
needs : ' build'
Original file line number Diff line number Diff line change @@ -76,9 +76,9 @@ spotless {
76
76
subprojects {
77
77
pluginManager.withPlugin(" java" ) {
78
78
// javaReleaseVersion can be set to override the global version
79
+ // Can't use providers.gradleProperty() because it doesn't work on subprojects
79
80
val jvmTargetProvider =
80
- providers
81
- .gradleProperty(" moshix.javaReleaseVersion" )
81
+ provider<String > { findProperty(" moshix.javaReleaseVersion" ) as ? String? }
82
82
.orElse(libs.versions.jvmTarget)
83
83
.map(String ::toInt)
84
84
configure<JavaPluginExtension > {
Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ plugins {
22
22
alias(libs.plugins.ksp)
23
23
}
24
24
25
+ kotlin.compilerOptions.optIn.add(" kotlin.ExperimentalStdlibApi" )
26
+
25
27
moshi { enableSealed.set(true ) }
26
28
27
29
val proguardRuleValidator =
@@ -38,15 +40,10 @@ val proguardRuleValidator =
38
40
}
39
41
}
40
42
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) }
50
47
51
48
dependencies {
52
49
testImplementation(" junit:junit:4.13.2" )
You can’t perform that action at this time.
0 commit comments