Skip to content
Open
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
9b624db
Add repositories configuration option in swift-java.config
bo2themax Aug 26, 2025
7bf0de7
Add a repositories configuration example and fix artifactUrls output
bo2themax Aug 26, 2025
6a126ec
Update naming convention
bo2themax Aug 26, 2025
ef69b18
Rename descriptionGradleStyle
bo2themax Aug 28, 2025
5a6616b
Add JavaJson Example
bo2themax Aug 28, 2025
9416c56
Change JavaRepositoryDescriptor to enum
bo2themax Aug 28, 2025
149358a
Add JavaRepositoryTests to test dependencies resolving with custom re…
bo2themax Aug 28, 2025
52243ad
Add documentation for swift-java resolve
bo2themax Aug 28, 2025
764d586
Add another non-resolvable config to verify artifactUrls
bo2themax Aug 28, 2025
7f6cd04
Move JavaRepositoryTests to SwiftJavaToolTests
bo2themax Aug 29, 2025
8bb6cfa
Rename JavaJson to OrgAndrejsJson
bo2themax Aug 29, 2025
c57c017
Add referenced issue in the document
bo2themax Aug 29, 2025
ab8f3ab
[Test] Change minified json to pretty printed
bo2themax Aug 29, 2025
f6f9800
Remove System dependency from OrgAndrejsJsonTests
bo2themax Aug 29, 2025
de3dab3
Add more referenced documents for JavaRepositoryDescriptor
bo2themax Aug 29, 2025
f6ad15f
[Test] Add a SimpleJavaProject to JavaRepositoryTests
bo2themax Aug 29, 2025
8e0687b
Merge branch 'swiftlang:main' into main
bo2themax Aug 29, 2025
a61c518
[Test] Update error messages in JavaRepositoryTests.swift
bo2themax Aug 29, 2025
967ccaf
[Test] Add missing license headers
bo2themax Aug 31, 2025
8fe1360
Add JavaResolver in SwiftJavaToolLib to resolve for ResolveCommand
bo2themax Sep 1, 2025
be87290
[Test] Move SwiftJavaToolTests/JavaRepositoryTests
bo2themax Sep 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove System dependency from OrgAndrejsJsonTests
  • Loading branch information
bo2themax committed Aug 29, 2025
commit f6f9800fe767ae4c73f103a79b4c1ed1011d174b
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@

import Foundation
import SwiftJava
#if canImport(System)
import System
#endif

// Import the json library wrapper:
import OrgAndrejsJson
Expand All @@ -32,27 +29,22 @@ enum OrgAndrejsJsonTests {
print(json.get("port").toString())
precondition(json.get("port").as(JavaInteger.self)!.intValue() == 80)

#if canImport(System)
print("Reading swift-java.config inside OrgAndrejsJson folder...")

let configPath = FilePath.currentWorkingDirectory.appending("Sources/OrgAndrejsJson/swift-java.config").string
let configPath = String.currentWorkingDirectory.appending("/Sources/OrgAndrejsJson/swift-java.config")

let config = try JavaClass<Json>().of.url("file://" + configPath)!

precondition(config.hasOwnProperty("repositories"))

print(config.toString())

#endif
}
}

#if canImport(System)
extension FilePath {
private extension String {
static var currentWorkingDirectory: Self {
let path = getcwd(nil, 0)!
defer { free(path) }
return .init(String(cString: path))
return String(cString: path)
}
}
#endif