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
5d43c933
Unverified
Commit
5d43c933
authored
Jan 13, 2021
by
Nikolay Igotti
Committed by
GitHub
Jan 13, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow optional local codesigning. (#41)
parent
569b27d3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
10 deletions
+32
-10
RELEASE.md
skiko/RELEASE.md
+10
-0
build.gradle.kts
skiko/build.gradle.kts
+20
-10
gradle.properties
skiko/gradle.properties
+2
-0
No files found.
skiko/RELEASE.md
View file @
5d43c933
...
...
@@ -44,3 +44,13 @@ Set up environment variables `COMPOSE_REPO_USERNAME` and `COMPOSE_REPO_KEY`.
```
./gradlew <PUBLISH_TASK> -Pdeploy.version=0.1.2 -Pdeploy.release=true
```
##### Code signing
macOS for Apple Silicon builds aimed for distribution require mandatory code signing,
so use command like
```
./gradlew -Psigner="Apple Distribution: Nikolay Igotti (N462MKSJ7M)" <PUBLISH_TASK>
```
to codesign the JNI library.
Use
`security find-identity -v -p codesigning`
to find valid signing identities.
skiko/build.gradle.kts
View file @
5d43c933
...
...
@@ -153,14 +153,6 @@ kotlin {
withJava
()
}
val
nativeTarget
=
when
(
targetOs
)
{
// TODO: not entirely correct for macOS ARM.
OS
.
MacOS
->
macosX64
(
"native"
)
OS
.
Linux
->
linuxX64
(
"native"
)
OS
.
Windows
->
mingwX64
(
"native"
)
else
->
throw
GradleException
(
"Host OS is not supported in Kotlin/Native."
)
}
sourceSets
{
val
commonMain
by
getting
{
dependencies
{
...
...
@@ -187,8 +179,6 @@ kotlin {
implementation
(
kotlin
(
"test-junit"
))
}
}
val
nativeMain
by
getting
val
nativeTest
by
getting
}
}
...
...
@@ -339,6 +329,26 @@ tasks.withType(LinkSharedLibrary::class.java).configureEach {
)
}
}
doLast
{
(
project
.
properties
[
"signer"
]
as
String
?)
?.
let
{
signer
->
outputs
.
files
.
files
.
singleOrNull
{
it
.
name
.
endsWith
(
".dylib"
)
}
?.
let
{
lib
->
println
(
"Signing $lib as $signer"
)
val
proc
=
ProcessBuilder
(
"codesign"
,
"-f"
,
"-s"
,
signer
,
lib
.
absolutePath
)
.
redirectOutput
(
ProcessBuilder
.
Redirect
.
PIPE
)
.
redirectError
(
ProcessBuilder
.
Redirect
.
PIPE
)
.
start
()
proc
.
waitFor
(
5
,
TimeUnit
.
MINUTES
)
if
(
proc
.
exitValue
()
!=
0
)
{
val
out
=
proc
.
inputStream
.
bufferedReader
().
readText
()
val
err
=
proc
.
errorStream
.
bufferedReader
().
readText
()
println
(
out
)
println
(
err
)
throw
GradleException
(
"Cannot sign $lib: $err"
)
}
}
}
}
}
extensions
.
configure
<
CppLibrary
>
{
...
...
skiko/gradle.properties
View file @
5d43c933
...
...
@@ -6,3 +6,5 @@ dependencies.skia.windows-x64=m88-64fc64c948/Skia-m88-64fc64c948-windows-Release
dependencies.skia.linux-x64
=
m88-64fc64c948/Skia-m88-64fc64c948-linux-Release-x64
dependencies.skia.macos-x64
=
m88-64fc64c948/Skia-m88-64fc64c948-macos-Release-x64
dependencies.skia.macos-arm64
=
m88-64fc64c948/Skia-m88-64fc64c948-macos-Release-arm64
#
signer
=
Apple Distribution: Nikolay Igotti (N462MKSJ7M)
\ No newline at end of file
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