Skip to content

Commit ef8b885

Browse files
committed
try to fix CI docc validation by guessing JAVA_HOME
1 parent bd45afb commit ef8b885

File tree

4 files changed

+16
-6
lines changed

4 files changed

+16
-6
lines changed

Package.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@ func findJavaHome() -> String {
2626
return home
2727
}
2828

29+
// Detect we're on CI and try to guess the JAVA_HOME for the shared Swift Soundness scripts
30+
if "/__w/swift-java/swift-java" == FileManager.default.currentDirectoryPath {
31+
let defaultCIJDKPath = "/usr/lib/jvm/default-jdk"
32+
if FileManager.default.fileExists(atPath: defaultCIJDKPath) {
33+
return defaultCIJDKPath
34+
}
35+
}
36+
2937
fatalError("Please set the JAVA_HOME environment variable to point to where Java is installed.")
3038
}
3139
let javaHome = findJavaHome()

Sources/JExtractSwift/JExtractSwift.docc/JExtractSwift.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ func callMe(maybe: () -> ()) {}
3838
```
3939

4040

41-
4241
## `jextract-swift` importer behavior
4342

4443
Only `public` functions, properties and types are imported.
@@ -60,3 +59,4 @@ public final class SomeModule ... {
6059
public static void globalFunction() { ... }
6160
}
6261
```
62+

Sources/SwiftJava/SwiftJava.docc/SwiftJava.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ Java interoperability for Swift.
55
This project offers both ways to simplify using JNI to call from Swift code into Java libraryes (primarily centered around the `JavaKit` library),
66
as well as a way to generate Java wrappers around existing Swift code to ease consumption of Swift libraries from Java.
77

8-
Please refer to
8+
The project is in early development so please reach out on github or the [swift forums](https://forums.swift.org)
99

1010
## Topics
1111

12-
### Calling Swift From Java
12+
### JavaKit
1313

1414
- ``JavaKit/JavaKit``
1515

16-
### Calling Java From Swift
16+
### jextract-swift
1717

18-
### In depth
18+
- ``JExtractSwift``

Sources/SwiftJava/dummy.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,6 @@
1212
//
1313
//===----------------------------------------------------------------------===//
1414

15-
// empty on purpose
15+
// empty on purpose
16+
17+
public func swiftkit_dummy() {}

0 commit comments

Comments
 (0)