Skip to content

Commit 9db7f54

Browse files
authored
Explain self-publishing swiftkit
Until we're able to publish libraries, this workaround is required to use jextract
1 parent ebe04bb commit 9db7f54

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

README.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,37 @@ This repository contains two approaches to Swift/Java interoperability.
55
- Swift library (`SwiftJava`) and bindings generator that allows a Swift program to make use of Java libraries by wrapping Java classes in corresponding Swift types, allowing Swift to directly call any wrapped Java API.
66
- The `swift-java` tool which which offers automated ways to import or "extract" bindings to sources or libraries in either language. The results are bindings for Swift or Java.
77

8-
## :construction: :construction: :construction: Early Development :construction: :construction: :construction:
8+
## :construction: Early Development :construction:
99

10-
**:construction: :construction: :construction: This is a *very early* prototype and everything is subject to change. :construction: :construction: :construction:**
10+
**:construction: This is a *very early* prototype and everything is subject to change. :construction:**
1111

1212
Parts of this project are incomplete, not fleshed out, and subject to change without any notice.
1313

1414
The primary purpose of this repository is to create an environment for collaboration and joint exploration of the Swift/Java interoperability story. The project will transition to a more structured approach once key goals have been outlined.
1515

16+
### :construction: Self-publish support Java libraries (SwiftKit)
17+
18+
While we work out how to provide the necessary support libraries for the Java side of Java code generated by `swift-java jextract`,
19+
you will currently need to publish them locally and depend on them this way;
20+
21+
To publish the libraries to your local maven repository (`$HOME/.m2`), you can run:
22+
23+
```
24+
// in swift-java/
25+
./gradlew publishToMavenLocal
26+
```
27+
28+
To consume these libraries in your Java project built using Gradle, you can then include the local repository in the repositories to resolve dependencies from:
29+
30+
```
31+
repositories {
32+
mavenLocal()
33+
mavenCentral()
34+
}
35+
```
36+
37+
We anticipate simplifying this in the future.
38+
1639
## Dependencies
1740

1841
### Required JDK versions

0 commit comments

Comments
 (0)