File tree Expand file tree Collapse file tree 5 files changed +18
-5
lines changed
SkipAndroidSDKBridge/Skip Expand file tree Collapse file tree 5 files changed +18
-5
lines changed Original file line number Diff line number Diff line change 1717 with :
1818 # disable export because there are currently problems with shared PCH module cache files with multi-module native export
1919 run-export : false
20+ run-local-tests : false
2021
Original file line number Diff line number Diff line change @@ -45,13 +45,26 @@ public class AndroidBridgeKotlin {
4545 fatalError ( " no AndroidContext.shared " )
4646 }
4747 #if os(Android)
48+ try setupTimezone ( )
4849 try setupFileManagerProperties ( filesDir: context. filesDir, cacheDir: context. cacheDir)
4950 try installSystemCertificates ( )
5051 #endif
5152 logger. log ( " initAndroidBridge done in \( Date . now. timeIntervalSince ( start) ) applicationSupportDirectory= \( URL . applicationSupportDirectory. path) " )
5253 }
5354}
5455
56+ private func setupTimezone( ) {
57+ // Until https://github.com/swiftlang/swift-foundation/pull/1053 gets merged
58+ tzset ( )
59+ var t = time ( nil )
60+ var lt : tm = tm ( )
61+ localtime_r ( & t, & lt)
62+ if let zoneptr = lt. tm_zone, let name = String ( validatingUTF8: zoneptr) {
63+ //logger.debug("detected timezone: \(name)")
64+ setenv ( " TZ " , name, 0 )
65+ }
66+
67+ }
5568
5669private func setupFileManagerProperties( filesDir: String , cacheDir: String ) throws {
5770 // https://github.com/swiftlang/swift-foundation/blob/main/Sources/FoundationEssentials/FileManager/SearchPaths/FileManager%2BXDGSearchPaths.swift#L46
Original file line number Diff line number Diff line change 11# Configuration file for https://skip.tools project
22skip :
3- mode : ' swift '
3+ mode : ' native '
44 bridging : true
Original file line number Diff line number Diff line change 1- # skip:
2- # mode: 'kotlin'
3- # bridging: true
1+ skip :
2+ mode : ' transpiled'
Original file line number Diff line number Diff line change 11skip :
2- mode : ' kotlin '
2+ mode : ' transpiled '
33 bridging : true
You can’t perform that action at this time.
0 commit comments