-
Notifications
You must be signed in to change notification settings - Fork 170
Build skiko with kotlin 2.3.0 #1173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
9ec0c8c
f2e6a30
014541f
38f758d
e9c7a79
120cbc3
9618024
505950f
59fbeb2
f5140f7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| kotlin.code.style=official | ||
| kotlin.version=2.0.10 | ||
| kotlin.version=2.3.0 | ||
| skiko.version=0.9.24 | ||
| #skiko.composite.build=1 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| @file:OptIn(ExperimentalKotlinGradlePluginApi::class) | ||
| @file:OptIn(ExperimentalKotlinGradlePluginApi::class, ExperimentalWasmDsl::class) | ||
|
|
||
| import com.android.build.gradle.LibraryExtension | ||
| import com.android.build.gradle.LibraryPlugin | ||
|
|
@@ -8,9 +8,9 @@ import org.jetbrains.compose.internal.publishing.MavenCentralProperties | |
| import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi | ||
| import org.jetbrains.kotlin.gradle.dsl.JvmTarget | ||
| import org.jetbrains.kotlin.gradle.dsl.KotlinJsCompile | ||
| import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl | ||
| import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask | ||
| import org.jetbrains.kotlin.gradle.tasks.KotlinNativeCompile | ||
| import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl | ||
| import tasks.configuration.* | ||
|
|
||
| plugins { | ||
|
|
@@ -96,7 +96,7 @@ kotlin { | |
| skikoProjectContext.declareWasmTasks() | ||
|
|
||
| js { | ||
| moduleName = "skiko-kjs" // override the name to avoid name collision with a different skiko.js file | ||
| outputModuleName.set("skiko-kjs") // override the name to avoid name collision with a different skiko.js file | ||
| browser { | ||
| testTask { | ||
| useKarma { | ||
|
|
@@ -120,7 +120,7 @@ kotlin { | |
|
|
||
| @OptIn(ExperimentalWasmDsl::class) | ||
| wasmJs { | ||
| moduleName = "skiko-kjs-wasm" // override the name to avoid name collision with a different skiko.js file | ||
| outputModuleName.set("skiko-kjs-wasm") // override the name to avoid name collision with a different skiko.js file | ||
| browser { | ||
| testTask { | ||
| useKarma { | ||
|
|
@@ -183,6 +183,10 @@ kotlin { | |
| implementation(libs.coroutines.core.jvm) | ||
| } | ||
|
|
||
| skikoProjectContext.webMainSourceSet?.dependencies { | ||
| implementation(libs.kotlinx.browser) | ||
| } | ||
|
|
||
| skikoProjectContext.awtMainSourceSet?.dependencies { | ||
| implementation(libs.jetbrainsRuntime.api) | ||
| } | ||
|
|
@@ -392,7 +396,7 @@ tasks.register("printSkiaVersion") { | |
|
|
||
| tasks.withType<KotlinNativeCompile>().configureEach { | ||
| // https://youtrack.jetbrains.com/issue/KT-56583 | ||
| compilerOptions.freeCompilerArgs.add("-XXLanguage:+ImplicitSignedToUnsignedIntegerConversion") | ||
| //compilerOptions.freeCompilerArgs.add("-XXLanguage:+ImplicitSignedToUnsignedIntegerConversion") | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this line commented intentionally? https://youtrack.jetbrains.com/issue/KT-56583 is fixed, can the line be removed completely?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this line was commented intentionally - I just wanted to discuss with our fellow composers whether it's needed but my understanding that it is indeed no longer needed so I'll just remove it |
||
| compilerOptions.freeCompilerArgs.add("-opt-in=kotlinx.cinterop.ExperimentalForeignApi") | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| kotlin.version=2.0.10 | ||
| kotlin.version=2.3.0 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,3 @@ | ||
| @file:OptIn(ExperimentalWasmDsl::class) | ||
|
|
||
| package tasks.configuration | ||
|
|
||
| import Arch | ||
|
|
@@ -19,16 +17,22 @@ import org.gradle.kotlin.dsl.getting | |
| import org.gradle.kotlin.dsl.provideDelegate | ||
| import org.gradle.kotlin.dsl.registering | ||
| import org.jetbrains.kotlin.gradle.plugin.* | ||
| import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl | ||
| import org.jetbrains.kotlin.gradle.targets.js.dsl.KotlinJsTargetDsl | ||
| import projectDirs | ||
| import registerOrGetSkiaDirProvider | ||
| import setupMjs | ||
| import setupReexportMjs | ||
| import skikoTestMjs | ||
| import supportWeb | ||
| import wasmImport | ||
| import java.io.File | ||
|
|
||
| private val Project.setupMjs | ||
| get() = wasmImport("setup.mjs") | ||
|
|
||
| private val Project.setupReexportMjs | ||
| get() = wasmImport("js-reexport-symbols.mjs") | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like this is not needed anymore? Judging based on the below changes where this is removed: |
||
|
|
||
| private val Project.skikoTestMjs | ||
| get() = wasmImport("skiko-test.mjs") | ||
|
|
||
| fun SkikoProjectContext.declareWasmTasks() { | ||
| if (!project.supportWeb) { | ||
| return | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a trailing space after the closing brace on this line. Remove the trailing whitespace.