Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
skiko
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liuqiang
skiko
Commits
942e9a0c
Unverified
Commit
942e9a0c
authored
Nov 05, 2025
by
Sebastian Sellmair
Committed by
GitHub
Nov 05, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Build Maintenance (#1118)
parent
2f56fecd
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
188 additions
and
283 deletions
+188
-283
dependencies.toml
dependencies.toml
+28
-0
build.gradle.kts
skiko/build.gradle.kts
+48
-251
build.gradle.kts
skiko/buildSrc/build.gradle.kts
+8
-8
settings.gradle.kts
skiko/buildSrc/settings.gradle.kts
+38
-0
sourceHierarchy.kt
skiko/buildSrc/src/main/kotlin/sourceHierarchy.kt
+58
-0
settings.gradle.kts
skiko/settings.gradle.kts
+8
-24
No files found.
dependencies.toml
0 → 100644
View file @
942e9a0c
[versions]
kotlin
=
"2.0.10"
coroutines
=
"1.8.0"
jetbrainsRuntime-api
=
"1.5.0"
androidGradlePlugin
=
"7.4.2"
dokka
=
"1.9.10"
buildHelpers-publishing
=
"0.1.18"
githubApi
=
"1.329"
gradleDownloadTask
=
"5.5.0"
cryptoChecksumPlugin
=
"1.4.0"
[libraries]
coroutines-core
=
{
module
=
"org.jetbrains.kotlinx:kotlinx-coroutines-core"
,
version.ref
=
"coroutines"
}
coroutines-core-jvm
=
{
module
=
"org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm"
,
version.ref
=
"coroutines"
}
coroutines-android
=
{
module
=
"org.jetbrains.kotlinx:kotlinx-coroutines-android"
,
version.ref
=
"coroutines"
}
coroutines-test
=
{
module
=
"org.jetbrains.kotlinx:kotlinx-coroutines-test"
,
version.ref
=
"coroutines"
}
jetbrainsRuntime-api
=
{
module
=
"org.jetbrains.runtime:jbr-api"
,
version.ref
=
"jetbrainsRuntime-api"
}
android-gradlePlugin
=
{
module
=
"com.android.tools.build:gradle"
,
version.ref
=
"androidGradlePlugin"
}
dokka-gradlePlugin
=
{
module
=
"org.jetbrains.dokka:dokka-gradle-plugin"
,
version.ref
=
"dokka"
}
gradleDownloadTask-gradlePlugin
=
{
module
=
"de.undercouch:gradle-download-task"
,
version.ref
=
"gradleDownloadTask"
}
githubApi
=
{
module
=
"org.kohsuke:github-api"
,
version.ref
=
"githubApi"
}
buildHelpers-publishing-gradlePlugin
=
{
module
=
"org.jetbrains.compose.internal.build-helpers:publishing"
,
version.ref
=
"buildHelpers-publishing"
}
crypto-checksum-gradlePlugin
=
{
module
=
"gradle.plugin.org.gradle.crypto:checksum"
,
version.ref
=
"cryptoChecksumPlugin"
}
skiko/build.gradle.kts
View file @
942e9a0c
@file
:
OptIn
(
ExperimentalKotlinGradlePluginApi
::
class
)
import
com.android.build.gradle.LibraryExtension
import
com.android.build.gradle.LibraryPlugin
import
org.gradle.api.tasks.testing.logging.TestExceptionFormat
import
org.gradle.crypto.checksum.Checksum
import
org.jetbrains.compose.internal.publishing.MavenCentralProperties
import
org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
import
tasks.configuration.*
import
kotlin.collections.HashMap
import
com.android.build.gradle.LibraryExtension
import
com.android.build.gradle.LibraryPlugin
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
tasks.configuration.*
plugins
{
kotlin
(
"multiplatform"
)
id
(
"org.jetbrains.dokka"
)
version
"1.9.10"
org
.
jetbrains
.
dokka
`
maven
-
publish
`
signing
id
(
"org.gradle.crypto.checksum"
)
version
"1.4.0"
org
.
gradle
.
crypto
.
checksum
}
if
(
supportAndroid
)
{
...
...
@@ -26,15 +28,11 @@ if (supportAndroid) {
apply
<
WasmImportsGeneratorCompilerPluginSupportPlugin
>()
apply
<
WasmImportsGeneratorForTestCompilerPluginSupportPlugin
>()
val
coroutinesVersion
=
"1.8.0"
val
atomicfuVersion
=
"0.23.2"
val
skiko
=
SkikoProperties
(
rootProject
)
val
buildType
=
skiko
.
buildType
val
targetOs
=
hostOs
val
targetArch
=
skiko
.
targetArch
val
skikoProjectContext
=
SkikoProjectContext
(
project
=
project
,
skiko
=
skiko
,
...
...
@@ -58,6 +56,7 @@ repositories {
}
kotlin
{
applyHierarchyTemplate
(
skikoSourceSetHierarchyTemplate
)
skikoProjectContext
.
declareSkiaTasks
()
if
(
supportAwt
)
{
...
...
@@ -86,7 +85,7 @@ kotlin {
attributes
.
attribute
(
Attribute
.
of
(
"ui"
,
String
::
class
.
java
),
"android"
)
}
// TODO: seems incorrect.
generateVersion
(
OS
.
Android
,
Arch
.
Arm64
,
skiko
,
"release"
)
generateVersion
(
OS
.
Android
,
Arch
.
Arm64
,
skiko
,
"release"
)
}
}
...
...
@@ -167,255 +166,53 @@ kotlin {
skikoProjectContext
.
configureNativeTarget
(
OS
.
TVOS
,
Arch
.
X64
,
tvosX64
())
}
sourceSets
{
val
commonMain
by
getting
{
dependencies
{
implementation
(
kotlin
(
"stdlib"
))
implementation
(
"org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion"
)
}
}
val
commonTest
by
getting
{
dependencies
{
implementation
(
kotlin
(
"test"
))
implementation
(
kotlin
(
"test-annotations-common"
))
}
}
val
jvmMain
by
creating
{
dependsOn
(
commonMain
)
dependencies
{
implementation
(
kotlin
(
"stdlib"
))
implementation
(
"org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:$coroutinesVersion"
)
}
}
if
(
supportAwt
)
{
val
awtMain
by
getting
{
dependsOn
(
jvmMain
)
dependencies
{
implementation
(
"org.jetbrains.runtime:jbr-api:1.5.0"
)
}
}
}
if
(
supportAndroid
)
{
val
androidMain
by
getting
{
dependsOn
(
jvmMain
)
dependencies
{
implementation
(
"org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion"
)
}
}
}
val
jvmTest
by
creating
{
dependsOn
(
commonTest
)
dependencies
{
implementation
(
"org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutinesVersion"
)
implementation
(
kotlin
(
"test-junit"
))
implementation
(
kotlin
(
"test"
))
}
}
if
(
supportAwt
)
{
val
awtTest
by
getting
{
dependsOn
(
jvmTest
)
}
}
if
(
supportAndroid
)
{
val
androidUnitTest
by
getting
{
dependsOn
(
jvmTest
)
}
}
if
(
supportWeb
||
supportAnyNative
)
{
val
nativeJsMain
by
creating
{
dependsOn
(
commonMain
)
}
val
nativeJsTest
by
creating
{
dependsOn
(
commonTest
)
}
if
(
supportWeb
)
{
val
webMain
by
creating
{
dependsOn
(
nativeJsMain
)
}
val
webTest
by
creating
{
dependsOn
(
nativeJsTest
)
resources
.
srcDirs
(
tasks
.
named
(
"linkWasm"
),
wasmImports
)
}
sourceSets
.
commonMain
.
dependencies
{
implementation
(
kotlin
(
"stdlib"
))
implementation
(
libs
.
coroutines
.
core
)
}
val
jsMain
by
getting
{
dependsOn
(
webMain
)
}
sourceSets
.
commonTest
.
dependencies
{
implementation
(
kotlin
(
"test"
))
implementation
(
kotlin
(
"test-annotations-common"
))
}
val
jsTest
by
getting
{
dependsOn
(
webTest
)
skikoProjectContext
.
jvmMainSourceSet
.
dependencies
{
implementation
(
kotlin
(
"stdlib"
))
implementation
(
libs
.
coroutines
.
core
.
jvm
)
}
}
skikoProjectContext
.
awtMainSourceSet
?.
dependencies
{
implementation
(
libs
.
jetbrainsRuntime
.
api
)
}
val
wasmJsMain
by
getting
{
dependsOn
(
webMain
)
}
skikoProjectContext
.
androidMainSourceSet
?.
dependencies
{
implementation
(
libs
.
coroutines
.
android
)
}
val
wasmJsTest
by
getting
{
dependsOn
(
webTest
)
skikoProjectContext
.
jvmTestSourceSet
.
dependencies
{
implementation
(
libs
.
coroutines
.
test
)
implementation
(
kotlin
(
"test-junit"
))
implementation
(
kotlin
(
"test"
))
}
dependencies
{
implementation
(
kotlin
(
"test-wasm-js"
))
}
}
}
skikoProjectContext
.
webTestSourceSet
?.
apply
{
resources
.
srcDirs
(
tasks
.
named
(
"linkWasm"
),
wasmImports
)
}
if
(
supportAnyNative
)
{
all
{
// Really ugly, see https://youtrack.jetbrains.com/issue/KT-46649 why it is required,
// note that setting it per source set still keeps it unset in commonized source sets.
languageSettings
.
optIn
(
"kotlin.native.SymbolNameIsInternal"
)
}
// See https://kotlinlang.org/docs/mpp-share-on-platforms.html#configure-the-hierarchical-structure-manually
val
nativeMain
by
creating
{
dependsOn
(
nativeJsMain
)
dependencies
{
// TODO: remove this explicit dependency on atomicfu
// after this is fixed https://jetbrains.slack.com/archives/C3TNY2MM5/p1701462109621819
implementation
(
"org.jetbrains.kotlinx:atomicfu:$atomicfuVersion"
)
}
}
val
nativeTest
by
creating
{
dependsOn
(
nativeJsTest
)
}
if
(
supportNativeLinux
)
{
val
linuxMain
by
creating
{
dependsOn
(
nativeMain
)
}
val
linuxTest
by
creating
{
dependsOn
(
nativeTest
)
}
val
linuxX64Main
by
getting
{
dependsOn
(
linuxMain
)
}
val
linuxX64Test
by
getting
{
dependsOn
(
linuxTest
)
}
val
linuxArm64Main
by
getting
{
dependsOn
(
linuxMain
)
}
val
linuxArm64Test
by
getting
{
dependsOn
(
linuxTest
)
}
}
if
(
supportAnyNativeIos
||
supportNativeMac
)
{
val
darwinMain
by
creating
{
dependsOn
(
nativeMain
)
}
val
darwinTest
by
creating
{
dependsOn
(
nativeTest
)
}
if
(
supportNativeMac
)
{
val
macosMain
by
creating
{
dependsOn
(
darwinMain
)
}
val
macosTest
by
creating
{
dependsOn
(
darwinTest
)
}
val
macosX64Main
by
getting
{
dependsOn
(
macosMain
)
}
val
macosX64Test
by
getting
{
dependsOn
(
macosTest
)
}
val
macosArm64Main
by
getting
{
dependsOn
(
macosMain
)
}
val
macosArm64Test
by
getting
{
dependsOn
(
macosTest
)
}
}
if
(
supportAnyNativeIos
||
supportAllNativeTvos
)
{
val
uikitMain
by
creating
{
dependsOn
(
darwinMain
)
}
val
uikitTest
by
creating
{
dependsOn
(
darwinTest
)
}
skikoProjectContext
.
wasmJsTest
?.
dependencies
{
implementation
(
kotlin
(
"test-wasm-js"
))
}
if
(
supportAnyNativeIos
)
{
val
iosMain
by
creating
{
dependsOn
(
uikitMain
)
}
val
iosTest
by
creating
{
dependsOn
(
uikitTest
)
}
if
(
supportNativeIosArm64
)
{
val
iosArm64Main
by
getting
{
dependsOn
(
iosMain
)
}
val
iosArm64Test
by
getting
{
dependsOn
(
iosTest
)
}
}
if
(
supportNativeIosSimulatorArm64
)
{
val
iosSimulatorArm64Main
by
getting
{
dependsOn
(
iosMain
)
}
val
iosSimulatorArm64Test
by
getting
{
dependsOn
(
iosTest
)
}
}
if
(
supportNativeIosX64
)
{
val
iosX64Main
by
getting
{
dependsOn
(
iosMain
)
}
val
iosX64Test
by
getting
{
dependsOn
(
iosTest
)
}
}
}
if
(
supportAnyNativeTvos
)
{
val
tvosMain
by
creating
{
dependsOn
(
uikitMain
)
}
val
tvosTest
by
creating
{
dependsOn
(
uikitTest
)
}
if
(
supportNativeTvosArm64
)
{
val
tvosArm64Main
by
getting
{
dependsOn
(
tvosMain
)
}
val
tvosArm64Test
by
getting
{
dependsOn
(
tvosTest
)
}
}
if
(
supportNativeTvosSimulatorArm64
)
{
val
tvosSimulatorArm64Main
by
getting
{
dependsOn
(
tvosMain
)
}
val
tvosSimulatorArm64Test
by
getting
{
dependsOn
(
tvosTest
)
}
}
if
(
supportNativeTvosX64
)
{
val
tvosX64Main
by
getting
{
dependsOn
(
tvosMain
)
}
val
tvosX64Test
by
getting
{
dependsOn
(
tvosTest
)
}
}
}
}
}
}
if
(
supportAnyNative
)
{
sourceSets
.
all
{
// Really ugly, see https://youtrack.jetbrains.com/issue/KT-46649 why it is required,
// note that setting it per source set still keeps it unset in commonized source sets.
languageSettings
.
optIn
(
"kotlin.native.SymbolNameIsInternal"
)
}
configureIOSTestsWithMetal
(
project
)
}
configureIOSTestsWithMetal
(
project
)
}
if
(
supportAndroid
)
{
...
...
skiko/buildSrc/build.gradle.kts
View file @
942e9a0c
...
...
@@ -2,15 +2,15 @@ plugins {
`
kotlin
-
dsl
`
}
repositories
{
mavenCentral
()
gradlePluginPortal
()
}
dependencies
{
implementation
(
kotlin
(
"stdlib"
))
compileOnly
(
gradleApi
())
val
kotlinVersion
=
project
.
properties
[
"kotlin.version"
]
as
String
implementation
(
kotlin
(
"gradle-plugin"
,
kotlinVersion
))
implementation
(
"de.undercouch:gradle-download-task:5.5.0"
)
implementation
(
kotlin
(
"gradle-plugin"
,
libs
.
versions
.
kotlin
.
get
()))
implementation
(
libs
.
android
.
gradlePlugin
)
implementation
(
libs
.
dokka
.
gradlePlugin
)
implementation
(
libs
.
buildHelpers
.
publishing
.
gradlePlugin
)
implementation
(
libs
.
gradleDownloadTask
.
gradlePlugin
)
implementation
(
libs
.
githubApi
)
implementation
(
libs
.
crypto
.
checksum
.
gradlePlugin
)
}
skiko/buildSrc/settings.gradle.kts
View file @
942e9a0c
...
...
@@ -4,3 +4,41 @@ pluginManagement {
gradlePluginPortal
()
}
}
dependencyResolutionManagement
{
repositories
{
maven
(
"https://maven.pkg.jetbrains.space/public/p/compose/internal"
)
{
content
{
includeGroupByRegex
(
"org.jetbrains.compose.internal.*"
)
}
}
maven
(
"https://maven.pkg.jetbrains.space/public/p/space/maven"
)
{
content
{
includeModuleByRegex
(
"org.jetbrains"
,
".*space.*"
)
}
}
google
{
mavenContent
{
includeGroupByRegex
(
".*android.*"
)
includeGroupByRegex
(
".*google.*"
)
}
}
gradlePluginPortal
{
content
{
includeGroupByRegex
(
".*com\\.gradle.*"
)
includeGroupByRegex
(
".*org\\.gradle.*"
)
}
}
mavenCentral
()
}
versionCatalogs
{
register
(
"libs"
)
{
from
(
files
(
"../../dependencies.toml"
))
}
}
}
skiko/buildSrc/src/main/kotlin/sourceHierarchy.kt
0 → 100644
View file @
942e9a0c
@file
:
OptIn
(
ExperimentalKotlinGradlePluginApi
::
class
)
import
org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import
org.jetbrains.kotlin.gradle.plugin.KotlinHierarchyTemplate
val
SkikoProjectContext
.
jvmMainSourceSet
get
()
=
kotlin
.
sourceSets
.
getByName
(
"jvmMain"
)
val
SkikoProjectContext
.
jvmTestSourceSet
get
()
=
kotlin
.
sourceSets
.
getByName
(
"jvmTest"
)
val
SkikoProjectContext
.
awtMainSourceSet
get
()
=
if
(
project
.
supportAwt
)
kotlin
.
sourceSets
.
getByName
(
"awtMain"
)
else
null
val
SkikoProjectContext
.
androidMainSourceSet
get
()
=
if
(
project
.
supportAndroid
)
kotlin
.
sourceSets
.
getByName
(
"androidMain"
)
else
null
val
SkikoProjectContext
.
webTestSourceSet
get
()
=
if
(
project
.
supportWeb
)
kotlin
.
sourceSets
.
getByName
(
"webTest"
)
else
null
val
SkikoProjectContext
.
wasmJsTest
get
()
=
if
(
project
.
supportWeb
)
kotlin
.
sourceSets
.
getByName
(
"wasmJsTest"
)
else
null
val
skikoSourceSetHierarchyTemplate
=
KotlinHierarchyTemplate
{
common
{
group
(
"jvm"
)
{
withAndroidTarget
()
withJvm
()
}
group
(
"web"
)
{
withJs
()
withWasmJs
()
}
group
(
"native"
)
{
group
(
"linux"
)
{
withLinux
()
}
group
(
"darwin"
)
{
group
(
"uikit"
)
{
group
(
"tvos"
)
group
(
"ios"
)
{
withIos
()
}
}
group
(
"macos"
)
{
withMacos
()
}
group
(
"tvos"
)
{
withTvos
()
}
}
}
group
(
"nativeJs"
)
{
group
(
"web"
)
group
(
"native"
)
}
}
}
skiko/settings.gradle.kts
View file @
942e9a0c
dependencyResolutionManagement
{
versionCatalogs
{
register
(
"libs"
)
{
from
(
files
(
"../dependencies.toml"
))
}
}
}
pluginManagement
{
repositories
{
mavenCentral
()
gradlePluginPortal
()
google
()
}
buildscript
{
repositories
{
mavenCentral
()
maven
(
"https://maven.pkg.jetbrains.space/public/p/compose/internal"
)
maven
(
"https://maven.pkg.jetbrains.space/public/p/space/maven"
)
google
()
}
dependencies
{
classpath
(
"org.jetbrains.compose.internal.build-helpers:publishing:0.1.18"
)
classpath
(
"org.kohsuke:github-api:1.329"
)
// Added dependency for Android Gradle plugin
classpath
(
"com.android.tools.build:gradle:7.4.2"
)
}
}
plugins
{
// whatever kotlinVersion we point to here, it will be ignored due to the nature of gradle design
// the actual version is set in buildSrc/gradle.properties
kotlin
(
"jvm"
)
kotlin
(
"multiplatform"
)
id
(
"com.android.library"
).
version
(
"7.4.2"
)
apply
false
}
}
rootProject
.
name
=
"skiko"
include
(
"ci"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment