Skip to content

Commit 4bb9d6d

Browse files
committed
Doc: add README
1 parent b641f18 commit 4bb9d6d

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

README.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
2+
# Swift Java Codegeneration annotation processor ![Maven Central](https://img.shields.io/maven-central/v/com.readdle.swift.java.codegen/compiler)
3+
4+
Annotation processor that generate Swift JNI code for Kotlin headers
5+
6+
## Pre-requirements
7+
8+
This annotation process only generate Swift JNI code. For compiling swift code for Android please use [Swift Android Gradle plugin](https://github.com/readdle/swift-android-gradle)
9+
10+
## Setup
11+
12+
1. Add the following to your root build.gradle
13+
14+
```gradle
15+
allprojects {
16+
repositories {
17+
mavenCentral()
18+
}
19+
}
20+
```
21+
22+
2. Add the following to your project build.gradle
23+
24+
```gradle
25+
dependencies {
26+
kapt "com.readdle.swift.java.codegen:compiler:$swift-java-codegen-version"
27+
implementation "com.readdle.swift.java.codegen:annotations:$swift-java-codegen-version"
28+
}
29+
```
30+
31+
32+
## Usage
33+
34+
Documentation in progress...
35+
36+
37+
## Samples
38+
39+
There are few samples that use Swift Java Codegen:
40+
41+
1. [Sample in this repo](https://github.com/readdle/swift-java-codegen/tree/master/sample)
42+
2. [Kotlin sample for Desktop](https://github.com/andriydruk/swift-kotlin-sample)
43+
3. [Cross-platform swift weather app](https://github.com/andriydruk/swift-weather-app)
44+
45+
## FAQ
46+
47+
### Why this project has Java in it name but doesn't support Java?
48+
49+
When this project was started Kotlin was in beta development. That's why we decide to move on with Java as primary language. After 4 year of development we moved to Kotlin and break Java support. If for some reason you would like to use this project with Java, latest Java support version us stil available on Maven Central.
50+
51+
### Could I generate Swift JNI without writing Kotlin headers manually?
52+
53+
Very good question. Probably it's possible but it's quite complicated. We invest time to research code generation based on Swift and have a small prototype. But the development of this new tool is still at a very early stage.

0 commit comments

Comments
 (0)