Skip to content

Commit be147bf

Browse files
committed
Update readme
1 parent 557b8fa commit be147bf

File tree

1 file changed

+26
-5
lines changed

1 file changed

+26
-5
lines changed

README.md

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,34 @@
22

33
CKlib is a gradle plugin that will build and package C/C++/Objective-C code for Kotlin/Native.
44

5-
# Note
5+
# Usage
6+
7+
Add gradle plugins
8+
9+
```kotlin
10+
plugins {
11+
kotlin("multiplatform")
12+
id("co.touchlab.cklib")
13+
}
14+
```
15+
16+
Add Kotlin version and define some C-like source:
617

7-
The main Kotlin project has changed how locally embedded C-like code is included in libraries, so we'll probably remove
8-
this project from public access soon until we land on a complete answer to handling this (our current solution is kind
9-
of a copy/paste of the main Kotlin solution).
18+
```kotlin
19+
cklib {
20+
config.kotlinVersion = KOTLIN_VERSION
21+
create("objcsample") {
22+
language = Language.OBJC
23+
}
24+
}
25+
```
26+
27+
See example in [Kermit](https://github.com/touchlab/Kermit/blob/main/kermit-crashlytics-test/build.gradle.kts#L69)
28+
29+
# Note
1030

11-
You can use this, but we won't be supporting it publicly as it's kind of brittle to set up and debug. Just FYI.
31+
The main Kotlin project has changed how locally embedded C-like code is included in libraries. Use
32+
this project if you'd like, but outside of private projects we won't really be supporting it much.
1233

1334
License
1435
=======

0 commit comments

Comments
 (0)