-
Notifications
You must be signed in to change notification settings - Fork 53
Add repositories configuration option in swift-java.config #374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Looks OK but this isn't tested at all, I'd be worried about having this accepted without the sample validating it. |
...es/JavaDependencySampleApp/Sources/JavaCommonsCSV/swift-java-with-custom-repositories.config
Outdated
Show resolved
Hide resolved
Would be good to document this in some docs as well, as otherwise it'll be hard to discover (we have md files in SwiftJavaDocumentation for docs, feel free to add one about resolving!) |
Yeah make sense, I'll add the target and some related documentation later |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall, I'm a bit unsure about the added test; can we make it work with just resolve
and without calling out to mvn?
Samples/JavaDependencySampleApp/Sources/JavaDependencySample/main.swift
Outdated
Show resolved
Hide resolved
Samples/JavaDependencySampleApp/Sources/JavaJson/swift-java.config
Outdated
Show resolved
Hide resolved
Sources/SwiftJavaDocumentation/Documentation.docc/SwiftJavaCommandLineTool.md
Show resolved
Hide resolved
Sources/SwiftJavaDocumentation/Documentation.docc/SwiftJavaCommandLineTool.md
Outdated
Show resolved
Hide resolved
I think so. I can only think of embedding the package inside the test resource, or maybe leveraging Gradle caches somehow. |
@ktoso Beside the reviews, I also added a few more changes this time. It’s better to go through the whole diff again🙏🏻
These four jobs are now passed both on Linux(Ubuntu 25, Swift 6.1 & 6.2) and macOS(26, Swift 6.2), so they should be able to pass on ci runners as well.
|
I was trying out a Gradle package and found out that the Maven Central repository was not enough for this package, so I added a configuration option for this. It can be configured in the
swift-java.config
file in the following format based on https://docs.gradle.org/current/userguide/supported_repository_types.html#sec:maven-repo.:Alongside this PR, I’ve also added:
JavaJson
target toJavaDependencySampleApp
.SwiftJavaTests
target.SwiftJavaCommandLineTool.md
. If you spot any incorrect wording, please let me know in the comments or add a review in the code.Test results:
Sample App outputs: