Repository navigation
Optimize dependencies to reduce runtime binary size - #516
Conversation
| with: ".", | ||
| options: .regularExpression | ||
| ) | ||
| let regex = try! Regex(#"(?<=\w)\$"#) |
There was a problem hiding this comment.
Please run tests when you develop patches, this will crash with: SwiftJava/String+Extensions.swift:37: Fatal error: 'try!' expression unexpectedly raised an error: lookbehind is not currently supported
Happy to take the change but please make sure the tests are passing
There was a problem hiding this comment.
I'm sorry for such a basic mistake.
I was only checking the swift-testing results and missed the failures in XCTest.
|
Fixed to not use lookbehind. |
|
Thanks! I'll check what's up with that other test |
|
Thank you, let's take this change :) |
Motivation
When shipping Swift libraries for Android applications, minimizing the binary size is highly desirable.
Currently, the runtime requirements for
SwiftJavainclude several libraries that appear to be excessive.This PR aims to reduce the number of dependencies to make the library more lightweight.
Changes
FoundationEssentialswhere possible, avoiding the heavier fullFoundationframework.SwiftJavaConfigurationShareddependency, it was not being utilized within the target.Results
By applying these changes, we have successfully reduced the number of required shared libraries (notably removing libdispatch, libswiftDispatch, libFoundation and libFoundationInternationalization).