Skip to content

Commit 29fe667

Browse files
authored
Release paging and core (#600)
* Release paging and core Signed-off-by: mramotar <mramotar@dropbox.com> * Format Signed-off-by: mramotar <mramotar@dropbox.com> * Use libs.versions.toml Signed-off-by: mramotar <mramotar@dropbox.com> --------- Signed-off-by: mramotar <mramotar@dropbox.com>
1 parent cf9d9b1 commit 29fe667

7 files changed

Lines changed: 146 additions & 25 deletions

File tree

core/build.gradle.kts

Lines changed: 66 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import com.vanniktech.maven.publish.SonatypeHost
2+
import org.jetbrains.dokka.gradle.DokkaTask
13

24
plugins {
35
kotlin("multiplatform")
@@ -6,12 +8,14 @@ plugins {
68
id("com.vanniktech.maven.publish")
79
id("org.jetbrains.dokka")
810
id("org.jetbrains.kotlinx.kover")
11+
id("co.touchlab.faktory.kmmbridge") version("0.3.2")
912
`maven-publish`
13+
kotlin("native.cocoapods")
1014
id("kotlinx-atomicfu")
1115
}
1216

1317
kotlin {
14-
androidTarget()
18+
android()
1519
jvm()
1620
iosArm64()
1721
iosX64()
@@ -32,8 +36,67 @@ kotlin {
3236
}
3337

3438
android {
35-
39+
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
3640
compileSdk = 33
3741

38-
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
42+
defaultConfig {
43+
minSdk = 24
44+
targetSdk = 33
45+
}
46+
47+
lint {
48+
disable += "ComposableModifierFactory"
49+
disable += "ModifierFactoryExtensionFunction"
50+
disable += "ModifierFactoryReturnType"
51+
disable += "ModifierFactoryUnreferencedReceiver"
52+
}
53+
54+
compileOptions {
55+
sourceCompatibility = JavaVersion.VERSION_11
56+
targetCompatibility = JavaVersion.VERSION_11
57+
}
58+
}
59+
60+
tasks.withType<DokkaTask>().configureEach {
61+
dokkaSourceSets.configureEach {
62+
reportUndocumented.set(false)
63+
skipDeprecated.set(true)
64+
jdkVersion.set(11)
65+
}
66+
}
67+
68+
mavenPublishing {
69+
publishToMavenCentral(SonatypeHost.S01)
70+
signAllPublications()
71+
}
72+
73+
addGithubPackagesRepository()
74+
kmmbridge {
75+
githubReleaseArtifacts()
76+
githubReleaseVersions()
77+
versionPrefix.set(libs.versions.store.get())
78+
spm()
79+
}
80+
81+
koverMerged {
82+
enable()
83+
84+
xmlReport {
85+
onCheck.set(true)
86+
reportFile.set(layout.projectDirectory.file("kover/coverage.xml"))
87+
}
88+
89+
htmlReport {
90+
onCheck.set(true)
91+
reportDir.set(layout.projectDirectory.dir("kover/html"))
92+
}
93+
94+
verify {
95+
onCheck.set(true)
96+
}
97+
}
98+
99+
atomicfu {
100+
transformJvm = false
101+
transformJs = false
39102
}

core/gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
POM_NAME=org.mobilenativefoundation.store
2+
POM_ARTIFACT_ID=core5
3+
POM_PACKAGING=jar

gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ testCore = "1.5.0"
2121
kmmBridge = "0.3.2"
2222
ktlint = "0.39.0"
2323
kover = "0.6.0"
24-
store = "5.0.0"
24+
store = "5.1.0-alpha01"
2525
truth = "1.1.3"
2626

2727
[libraries]
@@ -53,4 +53,4 @@ kotlinx-coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-cor
5353
junit = { group = "junit", name = "junit", version.ref = "junit" }
5454
google-truth = { group = "com.google.truth", name = "truth", version.ref = "truth" }
5555
touchlab-kermit = { group = "co.touchlab", name = "kermit", version.ref = "kermit" }
56-
turbine = "app.cash.turbine:turbine:0.12.3"
56+
turbine = "app.cash.turbine:turbine:1.0.0"

paging/build.gradle.kts

Lines changed: 67 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import com.vanniktech.maven.publish.SonatypeHost
2+
import org.jetbrains.dokka.gradle.DokkaTask
13

24
plugins {
35
kotlin("multiplatform")
@@ -6,42 +8,47 @@ plugins {
68
id("com.vanniktech.maven.publish")
79
id("org.jetbrains.dokka")
810
id("org.jetbrains.kotlinx.kover")
11+
id("co.touchlab.faktory.kmmbridge") version("0.3.2")
912
`maven-publish`
13+
kotlin("native.cocoapods")
1014
id("kotlinx-atomicfu")
11-
id("org.jetbrains.compose") version("1.5.1")
1215
}
1316

1417
kotlin {
15-
androidTarget()
18+
android()
19+
jvm()
20+
iosArm64()
21+
iosX64()
22+
linuxX64()
23+
iosSimulatorArm64()
24+
js {
25+
browser()
26+
nodejs()
27+
}
28+
cocoapods {
29+
summary = "Store5/Paging"
30+
homepage = "https://github.com/MobileNativeFoundation/Store"
31+
ios.deploymentTarget = "13"
32+
version = libs.versions.store.get()
33+
}
1634

1735
sourceSets {
1836
val commonMain by getting {
1937
dependencies {
2038
implementation(libs.kotlin.stdlib)
2139
implementation(project(":store"))
2240
implementation(project(":cache"))
23-
implementation(compose.runtime)
24-
implementation(compose.ui)
25-
implementation(compose.foundation)
26-
implementation(compose.material)
2741
api(project(":core"))
42+
implementation(libs.kotlinx.coroutines.core)
2843
}
2944
}
3045

31-
val androidMain by getting {
32-
dependencies {
33-
implementation(libs.androidx.paging.runtime)
34-
implementation(libs.androidx.paging.compose)
35-
}
36-
}
37-
@OptIn(org.jetbrains.compose.ExperimentalComposeLibrary::class)
46+
val androidMain by getting
3847
val commonTest by getting {
3948
dependencies {
4049
implementation(kotlin("test"))
4150
implementation(libs.turbine)
4251
implementation(libs.kotlinx.coroutines.test)
43-
implementation(compose.uiTestJUnit4)
44-
implementation(compose.ui)
4552
}
4653
}
4754
}
@@ -53,6 +60,7 @@ android {
5360

5461
defaultConfig {
5562
minSdk = 24
63+
targetSdk = 33
5664
}
5765

5866
lint {
@@ -67,3 +75,47 @@ android {
6775
targetCompatibility = JavaVersion.VERSION_11
6876
}
6977
}
78+
79+
tasks.withType<DokkaTask>().configureEach {
80+
dokkaSourceSets.configureEach {
81+
reportUndocumented.set(false)
82+
skipDeprecated.set(true)
83+
jdkVersion.set(11)
84+
}
85+
}
86+
87+
mavenPublishing {
88+
publishToMavenCentral(SonatypeHost.S01)
89+
signAllPublications()
90+
}
91+
92+
addGithubPackagesRepository()
93+
kmmbridge {
94+
githubReleaseArtifacts()
95+
githubReleaseVersions()
96+
versionPrefix.set(libs.versions.store.get())
97+
spm()
98+
}
99+
100+
koverMerged {
101+
enable()
102+
103+
xmlReport {
104+
onCheck.set(true)
105+
reportFile.set(layout.projectDirectory.file("kover/coverage.xml"))
106+
}
107+
108+
htmlReport {
109+
onCheck.set(true)
110+
reportDir.set(layout.projectDirectory.dir("kover/html"))
111+
}
112+
113+
verify {
114+
onCheck.set(true)
115+
}
116+
}
117+
118+
atomicfu {
119+
transformJvm = false
120+
transformJs = false
121+
}

paging/gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
POM_NAME=org.mobilenativefoundation.store
2+
POM_ARTIFACT_ID=paging5
3+
POM_PACKAGING=jar

paging/src/commonTest/kotlin/org/mobilenativefoundation/store/paging5/LaunchPagingStoreTests.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ import kotlinx.coroutines.flow.first
55
import kotlinx.coroutines.flow.flowOf
66
import kotlinx.coroutines.test.TestScope
77
import kotlinx.coroutines.test.runTest
8-
import org.junit.Before
9-
import org.junit.Test
8+
import org.mobilenativefoundation.store.core5.ExperimentalStoreApi
109
import org.mobilenativefoundation.store.paging5.util.FakePostApi
1110
import org.mobilenativefoundation.store.paging5.util.FakePostDatabase
1211
import org.mobilenativefoundation.store.paging5.util.PostApi
@@ -15,12 +14,13 @@ import org.mobilenativefoundation.store.paging5.util.PostDatabase
1514
import org.mobilenativefoundation.store.paging5.util.PostKey
1615
import org.mobilenativefoundation.store.paging5.util.PostPutRequestResult
1716
import org.mobilenativefoundation.store.paging5.util.PostStoreFactory
18-
import org.mobilenativefoundation.store.core5.ExperimentalStoreApi
1917
import org.mobilenativefoundation.store.store5.MutableStore
2018
import org.mobilenativefoundation.store.store5.StoreReadRequest
2119
import org.mobilenativefoundation.store.store5.StoreReadResponse
2220
import org.mobilenativefoundation.store.store5.StoreReadResponseOrigin
2321
import org.mobilenativefoundation.store.store5.StoreWriteRequest
22+
import kotlin.test.BeforeTest
23+
import kotlin.test.Test
2424
import kotlin.test.assertEquals
2525
import kotlin.test.assertIs
2626

@@ -33,7 +33,7 @@ class LaunchPagingStoreTests {
3333
private lateinit var db: PostDatabase
3434
private lateinit var store: MutableStore<PostKey, PostData>
3535

36-
@Before
36+
@BeforeTest
3737
fun setup() {
3838
api = FakePostApi()
3939
db = FakePostDatabase(userId)

store/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ addGithubPackagesRepository()
116116
kmmbridge {
117117
githubReleaseArtifacts()
118118
githubReleaseVersions()
119-
versionPrefix.set("5.0.0")
119+
versionPrefix.set(libs.versions.store.get())
120120
spm()
121121
}
122122

0 commit comments

Comments
 (0)