Skip to content

Commit b39e481

Browse files
committed
Improve publication
1 parent 9c63b98 commit b39e481

File tree

4 files changed

+47
-17
lines changed

4 files changed

+47
-17
lines changed

.gitignore

+2-14
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,8 @@
44
/local.properties
55

66
### IntelliJ IDEA ###
7-
/.idea/modules.xml
8-
/.idea/jarRepositories.xml
9-
/.idea/compiler.xml
10-
/.idea/libraries/
11-
/.idea/gradle.xml
12-
/.idea/kotlinc.xml
13-
/.idea/misc.xml
14-
/.idea/vcs.xml
15-
/.idea/artifacts
16-
/.idea/uiDesigner.xml
17-
/.idea/migrations.xml
18-
*.iws
19-
*.iml
20-
*.ipr
7+
/.idea
8+
!/.idea/codeStyles
219

2210
### Eclipse ###
2311
.apt_generated

build.gradle.kts

+43
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,46 @@
1+
import org.jetbrains.kotlin.konan.target.HostManager
2+
13
plugins {
24
kotlin("multiplatform") apply false
35
}
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+
}

gradle.properties

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
kotlin.code.style=official
2+
kotlin.native.ignoreDisabledTargets=true
3+
kotlin.mpp.enableCInteropCommonization=true
24

35
bigNumVersion=0.3.8
46
foojayVersion=0.5.0

kedis/build.gradle.kts

-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ kotlin {
2121
jvmToolchain(17)
2222
}
2323
addNativeTargets {
24-
binaries {
25-
sharedLib {}
26-
}
2724
}
2825

2926
sourceSets {

0 commit comments

Comments
 (0)