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
ae47b1d7
Unverified
Commit
ae47b1d7
authored
Jun 28, 2021
by
Nikolay Igotti
Committed by
GitHub
Jun 28, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move to Kotlin 1.5.10, improve cross-compilation. (#130)
parent
913a31a1
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
7 deletions
+10
-7
build.gradle.kts
samples/SkijaInjectSample/build.gradle.kts
+1
-1
App.kt
...kijaInjectSample/src/main/kotlin/SkijaInjectSample/App.kt
+1
-1
build.gradle.kts
skiko/build.gradle.kts
+4
-1
properties.kt
skiko/buildSrc/src/main/kotlin/properties.kt
+3
-3
OsArch.kt
skiko/src/jvmMain/kotlin/org/jetbrains/skiko/OsArch.kt
+1
-1
No files found.
samples/SkijaInjectSample/build.gradle.kts
View file @
ae47b1d7
import
org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import
org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins
{
plugins
{
kotlin
(
"jvm"
)
version
"1.
3.72
"
kotlin
(
"jvm"
)
version
"1.
5.10
"
application
application
}
}
...
...
samples/SkijaInjectSample/src/main/kotlin/SkijaInjectSample/App.kt
View file @
ae47b1d7
...
@@ -18,7 +18,7 @@ import java.io.File
...
@@ -18,7 +18,7 @@ import java.io.File
import
java.nio.file.Files
import
java.nio.file.Files
import
javax.imageio.ImageIO
import
javax.imageio.ImageIO
fun
main
(
args
:
Array
<
String
>
)
{
fun
main
()
{
val
windows
=
1
val
windows
=
1
repeat
(
windows
)
{
repeat
(
windows
)
{
createWindow
(
"window $it"
,
windows
==
1
)
createWindow
(
"window $it"
,
windows
==
1
)
...
...
skiko/build.gradle.kts
View file @
ae47b1d7
...
@@ -6,7 +6,7 @@ import org.jetbrains.kotlin.gradle.tasks.CInteropProcess
...
@@ -6,7 +6,7 @@ import org.jetbrains.kotlin.gradle.tasks.CInteropProcess
import
org.jetbrains.kotlin.gradle.tasks.KotlinNativeCompile
import
org.jetbrains.kotlin.gradle.tasks.KotlinNativeCompile
plugins
{
plugins
{
kotlin
(
"multiplatform"
)
version
"1.
4.3
0"
kotlin
(
"multiplatform"
)
version
"1.
5.1
0"
`
cpp
-
library
`
`
cpp
-
library
`
`
maven
-
publish
`
`
maven
-
publish
`
id
(
"org.gradle.crypto.checksum"
)
version
"1.1.0"
id
(
"org.gradle.crypto.checksum"
)
version
"1.1.0"
...
@@ -286,6 +286,7 @@ tasks.withType(CppCompile::class.java).configureEach {
...
@@ -286,6 +286,7 @@ tasks.withType(CppCompile::class.java).configureEach {
"-DSK_SHAPER_CORETEXT_AVAILABLE"
,
"-DSK_SHAPER_CORETEXT_AVAILABLE"
,
"-DSK_BUILD_FOR_MAC"
,
"-DSK_BUILD_FOR_MAC"
,
"-DSK_METAL"
,
"-DSK_METAL"
,
*
targetArch
.
clangFlags
,
*
buildType
.
clangFlags
*
buildType
.
clangFlags
)
)
)
)
...
@@ -342,6 +343,7 @@ project.tasks.register<Exec>("objcCompile") {
...
@@ -342,6 +343,7 @@ project.tasks.register<Exec>("objcCompile") {
val
skiaDir
=
skiaDir
.
get
().
absolutePath
val
skiaDir
=
skiaDir
.
get
().
absolutePath
commandLine
=
listOf
(
commandLine
=
listOf
(
"clang"
,
"clang"
,
*
targetArch
.
clangFlags
,
"-mmacosx-version-min=10.13"
,
"-mmacosx-version-min=10.13"
,
"-I$jdkHome/include"
,
"-I$jdkHome/include"
,
"-I$jdkHome/include/darwin"
,
"-I$jdkHome/include/darwin"
,
...
@@ -428,6 +430,7 @@ tasks.withType(LinkSharedLibrary::class.java).configureEach {
...
@@ -428,6 +430,7 @@ tasks.withType(LinkSharedLibrary::class.java).configureEach {
dependsOn
(
project
.
tasks
.
named
(
"objcCompile"
))
dependsOn
(
project
.
tasks
.
named
(
"objcCompile"
))
linkerArgs
.
addAll
(
linkerArgs
.
addAll
(
listOf
(
listOf
(
*
targetArch
.
clangFlags
,
"-dead_strip"
,
"-dead_strip"
,
"-framework"
,
"AppKit"
,
"-framework"
,
"AppKit"
,
"-framework"
,
"CoreFoundation"
,
"-framework"
,
"CoreFoundation"
,
...
...
skiko/buildSrc/src/main/kotlin/properties.kt
View file @
ae47b1d7
...
@@ -11,9 +11,9 @@ enum class OS(val id: String) {
...
@@ -11,9 +11,9 @@ enum class OS(val id: String) {
get
()
=
this
==
Windows
get
()
=
this
==
Windows
}
}
enum
class
Arch
(
val
id
:
String
)
{
enum
class
Arch
(
val
id
:
String
,
val
clangFlags
:
Array
<
String
>
)
{
X64
(
"x64"
),
X64
(
"x64"
,
arrayOf
(
"-arch"
,
"x86_64"
)
),
Arm64
(
"arm64"
),
Arm64
(
"arm64"
,
arrayOf
(
"-arch"
,
"arm64"
))
}
}
enum
class
SkiaBuildType
(
enum
class
SkiaBuildType
(
...
...
skiko/src/jvmMain/kotlin/org/jetbrains/skiko/OsArch.kt
View file @
ae47b1d7
...
@@ -39,7 +39,7 @@ val hostId by lazy {
...
@@ -39,7 +39,7 @@ val hostId by lazy {
}
}
internal
val
hostFullName
by
lazy
{
internal
val
hostFullName
by
lazy
{
"${System.getProperty("
os
.
name
")}, ${System.getProperty("
os
.
version
")}, ${hostArch.
toString().toLowerCase()
}"
"${System.getProperty("
os
.
name
")}, ${System.getProperty("
os
.
version
")}, ${hostArch.
id
}"
}
}
internal
val
javaVendor
by
lazy
{
internal
val
javaVendor
by
lazy
{
...
...
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