Skip to content

Commit 04346e1

Browse files
committed
Move the Windows implementation to the internal package
1 parent aabed34 commit 04346e1

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

core/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ tasks {
324324

325325
val downloadWindowsZonesMapping by tasks.registering {
326326
description = "Updates the mapping between Windows-specific and usual names for timezones"
327-
val output = "$projectDir/windows/src/WindowsZoneNames.kt"
327+
val output = "$projectDir/windows/src/internal/WindowsZoneNames.kt"
328328
outputs.file(output)
329329
doLast {
330330
val initialFileContents = try { File(output).readBytes() } catch(e: Throwable) { ByteArray(0) }
@@ -358,7 +358,7 @@ val downloadWindowsZonesMapping by tasks.registering {
358358
val bos = ByteArrayOutputStream()
359359
PrintWriter(bos).use { out ->
360360
out.println("""// generated with gradle task `$name`""")
361-
out.println("""package kotlinx.datetime""")
361+
out.println("""package kotlinx.datetime.internal""")
362362
out.println("""internal val standardToWindows: Map<String, String> = mutableMapOf(""")
363363
for ((usualName, windowsName) in sortedMapping) {
364364
out.println(" \"$usualName\" to \"$windowsName\",")

core/windows/src/TzdbInRegistry.kt renamed to core/windows/src/internal/TzdbInRegistry.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
* Use of this source code is governed by the Apache 2.0 License that can be found in the LICENSE.txt file.
44
*/
55
@file:OptIn(kotlinx.cinterop.ExperimentalForeignApi::class)
6-
package kotlinx.datetime
6+
package kotlinx.datetime.internal
77

8+
import kotlinx.datetime.*
89
import kotlinx.cinterop.*
910
import kotlinx.datetime.internal.*
1011
import platform.windows.*

core/windows/src/WindowsZoneNames.kt renamed to core/windows/src/internal/WindowsZoneNames.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// generated with gradle task `downloadWindowsZonesMapping`
2-
package kotlinx.datetime
2+
package kotlinx.datetime.internal
33
internal val standardToWindows: Map<String, String> = mutableMapOf(
44
"Africa/Abidjan" to "Greenwich Standard Time",
55
"Africa/Accra" to "Greenwich Standard Time",

0 commit comments

Comments
 (0)