Skip to content

Commit

Permalink
Update Kotlin to 1.9.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrtwhite committed Jul 25, 2023
1 parent 1d476fb commit d3f728f
Show file tree
Hide file tree
Showing 36 changed files with 379 additions and 12,622 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@ docs/0.x
# Testing
zipline-gradle-plugin/src/test/projects/**/gradle/wrapper

# Yarn
samples/**/yarn.lock
zipline-gradle-plugin/src/test/projects/**/yarn.lock

generated-zipline-webpack-config.js
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ systemProp.org.gradle.internal.http.socketTimeout=120000

kotlin.js.compiler=ir
kotlin.native.ignoreDisabledTargets=true
kotlin.mpp.androidSourceSetLayoutVersion1.nowarn=true
kotlin.mpp.androidSourceSetLayoutVersion=2
kotlin.mpp.stability.nowarn=true
kotlin.mpp.commonizerLogLevel=info
kotlin.mpp.enableCInteropCommonization=true
Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[versions]
androidx-compose = "1.4.3"
androidx-compose-compiler = "1.4.8"
androidx-compose-compiler = "1.5.0"
auto-service="1.1.1"
compileSdk = "33"
http4k = "4.48.0.0"
kotlin = "1.8.22"
kotlin = "1.9.0"
kotlinx-coroutines = "1.7.3"
kotlinx-serialization = "1.5.1"
okHttp = "4.11.0"
Expand Down
807 changes: 271 additions & 536 deletions kotlin-js-store/yarn.lock

Large diffs are not rendered by default.

3,018 changes: 0 additions & 3,018 deletions samples/kotlin-js-store/yarn.lock

This file was deleted.

6 changes: 5 additions & 1 deletion samples/trivia/trivia-js/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import app.cash.zipline.gradle.ZiplineCompileTask
import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnPlugin
import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootExtension

plugins {
kotlin("multiplatform")
Expand All @@ -22,8 +24,10 @@ kotlin {
}
}


zipline {
mainFunction.set("app.cash.zipline.samples.trivia.launchZipline")
}

plugins.withType<YarnPlugin> {
the<YarnRootExtension>().yarnLockAutoReplace = true
}
7 changes: 7 additions & 0 deletions samples/trivia/trivia-shared/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnPlugin
import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootExtension

apply(plugin = "app.cash.zipline")

plugins {
Expand All @@ -22,3 +25,7 @@ kotlin {
}
}
}

plugins.withType<YarnPlugin> {
the<YarnRootExtension>().yarnLockAutoReplace = true
}
8 changes: 7 additions & 1 deletion samples/world-clock/presenters/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnPlugin
import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootExtension

plugins {
kotlin("multiplatform")
Expand All @@ -12,7 +14,7 @@ kotlin {
iosX64()
iosSimulatorArm64()

android()
androidTarget()

js {
browser()
Expand Down Expand Up @@ -64,3 +66,7 @@ android {
zipline {
mainFunction.set("app.cash.zipline.samples.worldclock.main")
}

plugins.withType<YarnPlugin> {
the<YarnRootExtension>().yarnLockAutoReplace = true
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private val ziplineServiceClassId =
internal class FirZiplineApiReader(
output: FirResult,
) {
private val platformOutput = output.platformOutput
private val platformOutput = output.outputs.first()
private val session: FirSession = platformOutput.session

private val ziplineServiceClass: FirClassLikeSymbol<*>? =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import org.jetbrains.kotlin.cli.common.messages.MessageCollector
import org.jetbrains.kotlin.cli.jvm.compiler.EnvironmentConfigFiles
import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment
import org.jetbrains.kotlin.cli.jvm.compiler.VfsBasedProjectEnvironment
import org.jetbrains.kotlin.cli.jvm.compiler.pipeline.GroupedKtSources
import org.jetbrains.kotlin.cli.jvm.compiler.pipeline.ModuleCompilerEnvironment
import org.jetbrains.kotlin.cli.jvm.compiler.pipeline.ModuleCompilerInput
import org.jetbrains.kotlin.cli.jvm.compiler.pipeline.compileModuleToAnalyzedFir
Expand Down Expand Up @@ -102,12 +103,16 @@ internal class KotlinFirLoader(
}
}

val sourceFiles = files.mapTo(mutableSetOf(), ::KtVirtualFileSourceFile)
val input = ModuleCompilerInput(
targetId = TargetId(JvmProtoBufUtil.DEFAULT_MODULE_NAME, targetName),
groupedSources = GroupedKtSources(
platformSources = sourceFiles,
commonSources = emptyList(),
sourcesByModuleName = mapOf(JvmProtoBufUtil.DEFAULT_MODULE_NAME to sourceFiles),
),
commonPlatform = CommonPlatforms.defaultCommonPlatform,
commonSources = emptyList(),
platform = JvmPlatforms.unspecifiedJvmPlatform,
platformSources = files.map(::KtVirtualFileSourceFile),
configuration = configuration,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class ZiplinePluginTest {
.contains(result.task(taskName)!!.outcome)

val ziplineOut = projectDir.resolve(
"lib/build/distributionsZipline",
"lib/build/dist/js/productionExecutableZipline",
)
assertThat(ziplineOut.listFiles()?.size).isEqualTo(2)
assertThat(ziplineOut.resolve(manifestFileName).exists()).isTrue()
Expand Down Expand Up @@ -130,7 +130,7 @@ class ZiplinePluginTest {
.contains(result.task(taskName)!!.outcome)

val ziplineOut = projectDir.resolve(
"lib/build/compileSync/js/main/developmentExecutable/kotlinZipline",
"lib/build/compileSync/blue/main/developmentExecutable/kotlinZipline",
)
val manifest = ziplineOut.resolve(manifestFileName)
assertThat(manifest.exists()).isTrue()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

kotlin {
android()
androidTarget()
js {
browser()
binaries.executable()
Expand Down
Loading

0 comments on commit d3f728f

Please sign in to comment.