Skip to content

Commit e29d9f9

Browse files
committed
Update build things for better future support
Of Kotlin 2.2, Gradle 9, etc.
1 parent 84c7608 commit e29d9f9

File tree

4 files changed

+19
-17
lines changed

4 files changed

+19
-17
lines changed

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
distribution: 'zulu'
2424
java-version-file: .github/workflows/.java-version
2525

26-
- run: ./gradlew build dokkaHtml
26+
- run: ./gradlew build dokkaGenerate
2727

2828
- run: ./gradlew publish
2929
if: ${{ github.ref == 'refs/heads/trunk' && github.repository == 'cashapp/turbine' }}

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD_APP_CASH }}
2626
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_SECRET_KEY }}
2727
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_SECRET_PASSPHRASE }}
28-
run: ./gradlew dokkaHtml publish
28+
run: ./gradlew dokkaGenerate publish
2929

3030
- name: Extract release notes
3131
id: release_notes

build.gradle

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,26 @@ kotlin {
5151
tvosSimulatorArm64()
5252
tvosX64()
5353

54-
wasmJs()
55-
wasmWasi {
56-
nodejs()
57-
}
54+
wasmJs().nodejs()
55+
wasmWasi().nodejs()
5856

5957
watchosArm32()
6058
watchosArm64()
6159
watchosDeviceArm64()
6260
watchosSimulatorArm64()
6361
watchosX64()
6462

63+
applyDefaultHierarchyTemplate {
64+
it.group("common") {
65+
it.group('nonJvm') {
66+
it.group('native') {}
67+
it.withJs()
68+
it.withWasmJs()
69+
it.withWasmWasi()
70+
}
71+
}
72+
}
73+
6574
sourceSets {
6675
commonMain {
6776
dependencies {
@@ -74,9 +83,6 @@ kotlin {
7483
implementation 'org.jetbrains.kotlin:kotlin-test'
7584
}
7685
}
77-
nonJvmTest {
78-
dependsOn(commonTest)
79-
}
8086
}
8187

8288
sourceSets.matching { it.name.endsWith("Test") }.configureEach {
@@ -86,13 +92,6 @@ kotlin {
8692
optIn('kotlinx.coroutines.ExperimentalCoroutinesApi')
8793
}
8894
}
89-
90-
targets.each { target ->
91-
if (target.platformType == KotlinPlatformType.common) return
92-
if (target.platformType != KotlinPlatformType.jvm) {
93-
target.compilations.test.defaultSourceSet.dependsOn(sourceSets.nonJvmTest)
94-
}
95-
}
9695
}
9796

9897
spotless {
@@ -104,7 +103,7 @@ spotless {
104103
}
105104
}
106105

107-
dokkaHtml {
106+
dokka {
108107
dokkaSourceSets {
109108
configureEach {
110109
skipDeprecated.set(true)

gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,6 @@ POM_DEVELOPER_NAME=CashApp
2626
POM_DEVELOPER_URL=https://github.com/cashapp/
2727

2828
kotlin.mpp.stability.nowarn=true
29+
30+
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
31+
org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true

0 commit comments

Comments
 (0)