Skip to content

Commit b31b5e0

Browse files
committed
Change namespace from com.github.domgew to io.github.domgew
1 parent b39e481 commit b31b5e0

File tree

20 files changed

+82
-85
lines changed

20 files changed

+82
-85
lines changed

build.gradle.kts

-43
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,3 @@
1-
import org.jetbrains.kotlin.konan.target.HostManager
2-
31
plugins {
42
kotlin("multiplatform") apply false
53
}
6-
7-
// https://github.com/Dominaezzz/kotlin-sqlite/blob/master/build.gradle.kts
8-
subprojects {
9-
afterEvaluate {
10-
val publishTasks = tasks.withType<PublishToMavenRepository>()
11-
.matching {
12-
when {
13-
HostManager.hostIsMingw ->
14-
it.name.startsWith("publishMingw")
15-
16-
HostManager.hostIsMac ->
17-
it.name.startsWith("publishMacos")
18-
19-
HostManager.hostIsLinux ->
20-
it.name.startsWith("publishLinux")
21-
|| it.name.startsWith("publishJs")
22-
|| it.name.startsWith("publishJvmPublication")
23-
|| it.name.startsWith("publishMetadata")
24-
|| it.name.startsWith("publishKotlinMultiplatform")
25-
26-
else -> throw Exception("unknown host")
27-
}
28-
}
29-
30-
// println("#####################################")
31-
// println("overallPublishTasks:")
32-
// for (task in tasks.withType<PublishToMavenRepository>()) {
33-
// println("\t${task.name}")
34-
// }
35-
// println()
36-
// println("platformPublishTasks:")
37-
// for (task in publishTasks) {
38-
// println("\t${task.name}")
39-
// }
40-
// println("#####################################")
41-
42-
tasks.register("smartPublish") {
43-
dependsOn(publishTasks)
44-
}
45-
}
46-
}

example/src/commonMain/kotlin/CommonMain.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import com.github.domgew.kedis.KedisClient
2-
import com.github.domgew.kedis.KedisConfiguration
3-
import com.github.domgew.kedis.arguments.SyncOptions
1+
import io.github.domgew.kedis.KedisClient
2+
import io.github.domgew.kedis.KedisConfiguration
3+
import io.github.domgew.kedis.arguments.SyncOptions
44
import io.ktor.http.ContentType
55
import io.ktor.http.HttpStatusCode
66
import io.ktor.server.application.ApplicationCall

kedis/build.gradle.kts

+41-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
22
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
3+
import org.jetbrains.kotlin.konan.target.HostManager
34

45
val bigNumVersion: String by project
56
val kotlinCoroutinesVersion: String by project
@@ -11,7 +12,7 @@ plugins {
1112
id("maven-publish")
1213
}
1314

14-
group = "com.github.domgew"
15+
group = "io.github.domgew"
1516
version = "0.0.1"
1617

1718
kotlin {
@@ -57,6 +58,45 @@ publishing {
5758
}
5859
}
5960

61+
// smartPublish as per https://github.com/Dominaezzz/kotlin-sqlite/blob/master/build.gradle.kts
62+
afterEvaluate {
63+
val publishTasks = tasks.withType<PublishToMavenRepository>()
64+
.matching {
65+
when {
66+
HostManager.hostIsMingw ->
67+
it.name.startsWith("publishMingw")
68+
69+
HostManager.hostIsMac ->
70+
it.name.startsWith("publishMacos")
71+
72+
HostManager.hostIsLinux ->
73+
it.name.startsWith("publishLinux")
74+
|| it.name.startsWith("publishJs")
75+
|| it.name.startsWith("publishJvmPublication")
76+
|| it.name.startsWith("publishMetadata")
77+
|| it.name.startsWith("publishKotlinMultiplatform")
78+
79+
else -> throw Exception("unknown host")
80+
}
81+
}
82+
83+
// println("#####################################")
84+
// println("overallPublishTasks:")
85+
// for (task in tasks.withType<PublishToMavenRepository>()) {
86+
// println("\t${task.name}")
87+
// }
88+
// println()
89+
// println("platformPublishTasks:")
90+
// for (task in publishTasks) {
91+
// println("\t${task.name}")
92+
// }
93+
// println("#####################################")
94+
95+
tasks.register("smartPublish") {
96+
dependsOn(publishTasks)
97+
}
98+
}
99+
60100
fun KotlinMultiplatformExtension.addNativeTargets(
61101
block: KotlinNativeTarget.() -> Unit,
62102
) {

kedis/src/commonMain/kotlin/com/github/domgew/kedis/commands/KedisCommand.kt

-7
This file was deleted.

kedis/src/commonMain/kotlin/com/github/domgew/kedis/KedisClient.kt kedis/src/commonMain/kotlin/io/github/domgew/kedis/KedisClient.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
package com.github.domgew.kedis
1+
package io.github.domgew.kedis
22

3-
import com.github.domgew.kedis.arguments.SyncOptions
4-
import com.github.domgew.kedis.impl.DefaultKedisClient
3+
import io.github.domgew.kedis.arguments.SyncOptions
4+
import io.github.domgew.kedis.impl.DefaultKedisClient
55

66
/**
77
* Each connection should have its own instance.

kedis/src/commonMain/kotlin/com/github/domgew/kedis/KedisConfiguration.kt kedis/src/commonMain/kotlin/io/github/domgew/kedis/KedisConfiguration.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.github.domgew.kedis
1+
package io.github.domgew.kedis
22

33
public data class KedisConfiguration(
44
/**

kedis/src/commonMain/kotlin/com/github/domgew/kedis/KedisException.kt kedis/src/commonMain/kotlin/io/github/domgew/kedis/KedisException.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.github.domgew.kedis
1+
package io.github.domgew.kedis
22

33
public sealed interface KedisException {
44
public data object ConnectionTimeout : Exception("Connection timed out"), KedisException

kedis/src/commonMain/kotlin/com/github/domgew/kedis/arguments/SyncOptions.kt kedis/src/commonMain/kotlin/io/github/domgew/kedis/arguments/SyncOptions.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.github.domgew.kedis.arguments
1+
package io.github.domgew.kedis.arguments
22

33
public enum class SyncOptions {
44
SYNC,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package io.github.domgew.kedis.commands
2+
3+
import io.github.domgew.kedis.impl.RedisMessage
4+
5+
internal interface KedisCommand {
6+
fun toRedisMessage(): RedisMessage
7+
}

kedis/src/commonMain/kotlin/com/github/domgew/kedis/commands/KedisStringArrayCommand.kt kedis/src/commonMain/kotlin/io/github/domgew/kedis/commands/KedisStringArrayCommand.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
package com.github.domgew.kedis.commands
1+
package io.github.domgew.kedis.commands
22

3-
import com.github.domgew.kedis.impl.RedisMessage
3+
import io.github.domgew.kedis.impl.RedisMessage
44

55
internal data class KedisStringArrayCommand(
66
val values: List<String>,

kedis/src/commonMain/kotlin/com/github/domgew/kedis/impl/AbstractKedisClient.kt kedis/src/commonMain/kotlin/io/github/domgew/kedis/impl/AbstractKedisClient.kt

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
package com.github.domgew.kedis.impl
1+
package io.github.domgew.kedis.impl
22

3-
import com.github.domgew.kedis.KedisClient
4-
import com.github.domgew.kedis.KedisConfiguration
5-
import com.github.domgew.kedis.KedisException
6-
import com.github.domgew.kedis.commands.KedisCommand
3+
import io.github.domgew.kedis.KedisClient
4+
import io.github.domgew.kedis.KedisConfiguration
5+
import io.github.domgew.kedis.KedisException
6+
import io.github.domgew.kedis.commands.KedisCommand
77
import io.ktor.network.selector.SelectorManager
88
import io.ktor.network.sockets.InetSocketAddress
99
import io.ktor.network.sockets.Socket

kedis/src/commonMain/kotlin/com/github/domgew/kedis/impl/DefaultKedisClient.kt kedis/src/commonMain/kotlin/io/github/domgew/kedis/impl/DefaultKedisClient.kt

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
package com.github.domgew.kedis.impl
1+
package io.github.domgew.kedis.impl
22

3-
import com.github.domgew.kedis.KedisConfiguration
4-
import com.github.domgew.kedis.KedisException
5-
import com.github.domgew.kedis.arguments.SyncOptions
6-
import com.github.domgew.kedis.commands.KedisStringArrayCommand
3+
import io.github.domgew.kedis.KedisConfiguration
4+
import io.github.domgew.kedis.KedisException
5+
import io.github.domgew.kedis.arguments.SyncOptions
6+
import io.github.domgew.kedis.commands.KedisStringArrayCommand
77
import kotlinx.coroutines.runBlocking
88
import kotlinx.coroutines.sync.withLock
99

kedis/src/commonMain/kotlin/com/github/domgew/kedis/impl/RedisMessage.kt kedis/src/commonMain/kotlin/io/github/domgew/kedis/impl/RedisMessage.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.github.domgew.kedis.impl
1+
package io.github.domgew.kedis.impl
22

33
import com.ionspin.kotlin.bignum.integer.BigInteger
44
import io.ktor.utils.io.ByteReadChannel
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
package com.github.domgew.kedis
1+
package io.github.domgew.kedis
22

33
internal expect fun getEnv(name: String): String?

kedis/src/commonTest/kotlin/com/github/domgew/kedis/RedisMessageIntegrationTest.kt kedis/src/commonTest/kotlin/io/github/domgew/kedis/RedisMessageIntegrationTest.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
package com.github.domgew.kedis
1+
package io.github.domgew.kedis
22

3-
import com.github.domgew.kedis.impl.RedisMessage
4-
import com.github.domgew.kedis.utils.SocketUtil
3+
import io.github.domgew.kedis.impl.RedisMessage
4+
import io.github.domgew.kedis.utils.SocketUtil
55
import kotlin.test.Test
66
import kotlin.test.assertEquals
77
import kotlin.test.assertIs

kedis/src/commonTest/kotlin/com/github/domgew/kedis/SimpleE2ETest.kt kedis/src/commonTest/kotlin/io/github/domgew/kedis/SimpleE2ETest.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
package com.github.domgew.kedis
1+
package io.github.domgew.kedis
22

3-
import com.github.domgew.kedis.arguments.SyncOptions
4-
import com.github.domgew.kedis.utils.TestConfigUtil
3+
import io.github.domgew.kedis.arguments.SyncOptions
4+
import io.github.domgew.kedis.utils.TestConfigUtil
55
import kotlin.test.Test
66
import kotlin.test.assertEquals
77
import kotlin.test.assertNull

kedis/src/commonTest/kotlin/com/github/domgew/kedis/utils/SocketUtil.kt kedis/src/commonTest/kotlin/io/github/domgew/kedis/utils/SocketUtil.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.github.domgew.kedis.utils
1+
package io.github.domgew.kedis.utils
22

33
import io.ktor.network.selector.SelectorManager
44
import io.ktor.network.sockets.InetSocketAddress

kedis/src/commonTest/kotlin/com/github/domgew/kedis/utils/TestConfigUtil.kt kedis/src/commonTest/kotlin/io/github/domgew/kedis/utils/TestConfigUtil.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
package com.github.domgew.kedis.utils
1+
package io.github.domgew.kedis.utils
22

3-
import com.github.domgew.kedis.getEnv
3+
import io.github.domgew.kedis.getEnv
44

55
object TestConfigUtil {
66
fun getPort(): Int {
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.github.domgew.kedis
1+
package io.github.domgew.kedis
22

33
internal actual fun getEnv(name: String): String? =
44
System.getenv(name)

kedis/src/nativeTest/kotlin/com/github/domgew/kedis/Platform.native.kt kedis/src/nativeTest/kotlin/io/github/domgew/kedis/Platform.native.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.github.domgew.kedis
1+
package io.github.domgew.kedis
22

33
import kotlinx.cinterop.ExperimentalForeignApi
44
import kotlinx.cinterop.toKString

0 commit comments

Comments
 (0)