Skip to content

Commit 376df63

Browse files
authored
Update build things for better future support (#394)
Of Kotlin 2.2, Gradle 9, etc.
1 parent 84c7608 commit 376df63

File tree

4 files changed

+18
-28
lines changed

4 files changed

+18
-28
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: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2-
import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType
32
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinJvmCompilation
43

54
plugins {
@@ -51,17 +50,26 @@ kotlin {
5150
tvosSimulatorArm64()
5251
tvosX64()
5352

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

5956
watchosArm32()
6057
watchosArm64()
6158
watchosDeviceArm64()
6259
watchosSimulatorArm64()
6360
watchosX64()
6461

62+
applyDefaultHierarchyTemplate {
63+
it.group("common") {
64+
it.group('nonJvm') {
65+
it.group('native') {}
66+
it.withJs()
67+
it.withWasmJs()
68+
it.withWasmWasi()
69+
}
70+
}
71+
}
72+
6573
sourceSets {
6674
commonMain {
6775
dependencies {
@@ -74,9 +82,6 @@ kotlin {
7482
implementation 'org.jetbrains.kotlin:kotlin-test'
7583
}
7684
}
77-
nonJvmTest {
78-
dependsOn(commonTest)
79-
}
8085
}
8186

8287
sourceSets.matching { it.name.endsWith("Test") }.configureEach {
@@ -86,13 +91,6 @@ kotlin {
8691
optIn('kotlinx.coroutines.ExperimentalCoroutinesApi')
8792
}
8893
}
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-
}
9694
}
9795

9896
spotless {
@@ -103,14 +101,3 @@ spotless {
103101
])
104102
}
105103
}
106-
107-
dokkaHtml {
108-
dokkaSourceSets {
109-
configureEach {
110-
skipDeprecated.set(true)
111-
externalDocumentationLink {
112-
url.set(new URL('https://kotlin.github.io/kotlinx.coroutines/'))
113-
}
114-
}
115-
}
116-
}

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)