Skip to content

Commit ca42819

Browse files
authored
Release 5.1.0-alpha07 (#719)
* Revert "Update CI (#716)" This reverts commit e4eb9ee. * Revert "Update CI (#714)" This reverts commit e963bf5. * Revert "Update Maven Publish Plugin (#711)" This reverts commit c8f8652. * Revert "Remove S01 (#709)" This reverts commit 99571d3. * Upgrade Maven Publish Plugin to 0.34.0 and AGP to Min Supported Version (8.0.0) Signed-off-by: Matt Ramotar <[email protected]> * Update Cocoapods Configuration Signed-off-by: Matt Ramotar <[email protected]> * Api Dump Signed-off-by: Matt Ramotar <[email protected]> * Remove xml import Signed-off-by: Matt Ramotar <[email protected]> * Update CI to use JDK 17 Signed-off-by: Matt Ramotar <[email protected]> * Fix AndroidConventionPlugin Signed-off-by: Matt Ramotar <[email protected]> --------- Signed-off-by: Matt Ramotar <[email protected]>
1 parent e4eb9ee commit ca42819

File tree

8 files changed

+93
-36
lines changed

8 files changed

+93
-36
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,25 @@ jobs:
6464
with:
6565
distribution: 'zulu'
6666
java-version: '17'
67-
cache: 'gradle'
6867

6968
- name: Grant execute permission for Gradlew
7069
run: chmod +x gradlew
7170

7271
- name: Upload Artifacts to Maven Central
73-
run: ./gradlew publishToMavenCentral --no-daemon --no-parallel
72+
run: ./gradlew publishAllPublicationsToMavenCentralRepository --no-daemon --no-parallel
7473
env:
75-
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
76-
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
74+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }}
75+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }}
7776
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }}
78-
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
77+
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
78+
79+
- name: Retrieve Version
80+
run: |
81+
echo "VERSION_NAME=$(cat gradle.properties | grep -w "VERSION_NAME" | cut -d'=' -f2)" >> $GITHUB_ENV
82+
83+
- name: Publish Release
84+
run: ./gradlew closeAndReleaseRepository --no-daemon --no-parallel
85+
if: "!endsWith(env.VERSION_NAME, '-SNAPSHOT')"
86+
env:
87+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }}
88+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: Create Swift Package
2+
3+
on:
4+
workflow_dispatch:
5+
jobs:
6+
publish:
7+
uses: touchlab/KMMBridgeGithubWorkflow/.github/workflows/[email protected]

RELEASING.md

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,27 @@ Releasing
22
========
33

44
1. Change the version in top level `gradle.properties` to a non-SNAPSHOT version.
5-
2. Update the `CHANGELOG.md` for the impending release.
6-
3. Update the `README.md` with the new version.
7-
4. `git commit -sam "Prepare for release X.Y.Z."` (where X.Y.Z is the new version)
8-
5. `git tag -a X.Y.X -m "Version X.Y.Z"` (where X.Y.Z is the new version)
5+
2. Update the `cocoapods` version in `build.gradle.kts` in `:store`.
6+
3. Modify `create_swift_package.yml` workflow.
7+
* https://github.com/MobileNativeFoundation/Store/blob/e526400cdf51aa2f78b6b7e9e87f4a6845e6dcea/.github/workflows/create_swift_package.yml
8+
4. Update the `CHANGELOG.md` for the impending release.
9+
5. Update the `README.md` with the new version.
10+
6. `git commit -sam "Prepare for release X.Y.Z."` (where X.Y.Z is the new version)
11+
7. `git tag -a X.Y.X -m "Version X.Y.Z"` (where X.Y.Z is the new version)
912
* Run `git tag` to verify it.
10-
6. `git push && git push --tags`
13+
8. `git push && git push --tags`
1114
* This should be pushed to your fork.
12-
7. Create a PR with this commit and merge it.
13-
8. Update the top level `build.gradle` to the next SNAPSHOT version.
14-
9. `git commit -am "Prepare next development version."`
15-
10. Create a PR with this commit and merge it.
16-
11. Login to Sonatype to promote the artifacts https://central.sonatype.org/pages/releasing-the-deployment.html
15+
9. Create a PR with this commit and merge it.
16+
10. Update the top level `build.gradle` to the next SNAPSHOT version.
17+
11. Modify `create_swift_package.yml` workflow to only run manually.
18+
* https://github.com/MobileNativeFoundation/Store/blob/de9ed1764408eeaafe5e58fe602205c875a8b0b0/.github/workflows/create_swift_package.yml
19+
12. `git commit -am "Prepare next development version."`
20+
13. Create a PR with this commit and merge it.
21+
14. Login to Sonatype to promote the artifacts https://central.sonatype.org/pages/releasing-the-deployment.html
1722
* This part is automated. If it fails in CI, follow the steps below.
1823
* Click on Staging Repositories under Build Promotion
1924
* Select all the Repositories that contain the content you want to release
2025
* Click on Close and refresh until the Release button is active
2126
* Click Release and submit
22-
12. Update the sample module's `build.gradle` to point to the newly released version. (It may take ~2 hours for artifact to be available after release)
27+
15. Update the sample module's `build.gradle` to point to the newly released version. (It may take ~2 hours for artifact to be available after release)
2328

build.gradle.kts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ buildscript {
1919
classpath(libs.jacoco.gradle.plugin)
2020
classpath(libs.maven.publish.plugin)
2121
classpath(libs.atomic.fu.gradle.plugin)
22+
classpath(libs.kmmBridge.gradle.plugin)
2223
classpath(libs.binary.compatibility.validator)
2324
}
2425
}
@@ -48,13 +49,13 @@ subprojects {
4849
tasks {
4950
withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
5051
kotlinOptions {
51-
jvmTarget = "17"
52+
jvmTarget = "11"
5253
}
5354
}
5455

5556
withType<JavaCompile>().configureEach {
56-
sourceCompatibility = JavaVersion.VERSION_17.name
57-
targetCompatibility = JavaVersion.VERSION_17.name
57+
sourceCompatibility = JavaVersion.VERSION_11.name
58+
targetCompatibility = JavaVersion.VERSION_11.name
5859
}
5960
}
6061

gradle/libs.versions.toml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,35 @@
11
[versions]
22
androidMinSdk = "24"
33
androidCompileSdk = "33"
4-
androidGradlePlugin = "8.0.2"
4+
androidGradlePlugin = "8.0.0"
55
androidTargetSdk = "33"
66
atomicFu = "0.24.0"
7-
baseKotlin = "2.1.21"
7+
baseKotlin = "2.0.20"
88
dokkaGradlePlugin = "1.9.20"
99
ktlintGradle = "12.1.0"
1010
jacocoGradlePlugin = "0.8.12"
1111
mavenPublishPlugin = "0.34.0"
1212
moleculeGradlePlugin = "1.2.1"
13+
pagingCompose = "3.3.0-alpha02"
14+
pagingRuntime = "3.2.1"
1315
spotlessPluginGradle = "6.4.1"
1416
junit = "4.13.2"
1517
kotlinxCoroutines = "1.8.1"
1618
kotlinxSerialization = "1.6.3"
1719
kermit = "2.0.5"
1820
testCore = "1.6.1"
21+
kmmBridge = "0.3.2"
1922
ktlint = "0.39.0"
2023
kover = "0.9.0-RC"
2124
store = "5.1.0-alpha07"
2225
truth = "1.1.3"
2326
turbine = "1.2.0"
24-
binary-compatibility-validator = "0.16.3"
27+
binary-compatibility-validator = "0.15.0-Beta.2"
2528

2629
[libraries]
2730
android-gradle-plugin = { group = "com.android.tools.build", name = "gradle", version.ref = "androidGradlePlugin" }
31+
androidx-paging-compose = { module = "androidx.paging:paging-compose", version.ref = "pagingCompose" }
32+
androidx-paging-runtime = { module = "androidx.paging:paging-runtime", version.ref = "pagingRuntime" }
2833
kotlin-gradle-plugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "baseKotlin" }
2934
kotlin-serialization-plugin = { group = "org.jetbrains.kotlin", name = "kotlin-serialization", version.ref = "baseKotlin" }
3035
dokka-gradle-plugin = { group = "org.jetbrains.dokka", name = "dokka-gradle-plugin", version.ref = "dokkaGradlePlugin" }
@@ -34,6 +39,7 @@ maven-publish-plugin = { group = "com.vanniktech", name = "gradle-maven-publish-
3439
kover-gradle-plugin = {group = "org.jetbrains.kotlinx", name = "kover-gradle-plugin", version.ref = "kover"}
3540

3641
atomic-fu-gradle-plugin = { group = "org.jetbrains.kotlinx", name = "atomicfu-gradle-plugin", version.ref = "atomicFu" }
42+
kmmBridge-gradle-plugin = { group = "co.touchlab.faktory.kmmbridge", name = "co.touchlab.faktory.kmmbridge.gradle.plugin", version.ref = "kmmBridge" }
3743

3844
kotlinx-atomic-fu = { group = "org.jetbrains.kotlinx", name = "atomicfu", version.ref = "atomicFu" }
3945
kotlin-stdlib = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib", version.ref = "baseKotlin" }

tooling/plugins/build.gradle.kts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ plugins {
55
group = "org.mobilenativefoundation.store"
66

77
java {
8-
sourceCompatibility = JavaVersion.VERSION_17
9-
targetCompatibility = JavaVersion.VERSION_17
8+
sourceCompatibility = JavaVersion.VERSION_11
9+
targetCompatibility = JavaVersion.VERSION_11
1010

1111
toolchain {
12-
languageVersion.set(JavaLanguageVersion.of(17))
12+
languageVersion.set(JavaLanguageVersion.of(11))
1313
}
1414
}
1515

@@ -18,6 +18,7 @@ dependencies {
1818
compileOnly(libs.kotlin.gradle.plugin)
1919
compileOnly(libs.dokka.gradle.plugin)
2020
compileOnly(libs.maven.publish.plugin)
21+
compileOnly(libs.kmmBridge.gradle.plugin)
2122
compileOnly(libs.atomic.fu.gradle.plugin)
2223
}
2324

tooling/plugins/src/main/kotlin/org/mobilenativefoundation/store/tooling/plugins/AndroidConventionPlugin.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ class AndroidConventionPlugin : Plugin<Project> {
3737
}
3838

3939
compileOptions {
40-
sourceCompatibility = JavaVersion.VERSION_17
41-
targetCompatibility = JavaVersion.VERSION_17
40+
sourceCompatibility = JavaVersion.VERSION_11
41+
targetCompatibility = JavaVersion.VERSION_11
4242
}
4343
}
4444

tooling/plugins/src/main/kotlin/org/mobilenativefoundation/store/tooling/plugins/KotlinMultiplatformConventionPlugin.kt

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
22

33
package org.mobilenativefoundation.store.tooling.plugins
44

5+
import addGithubPackagesRepository
6+
import co.touchlab.faktory.KmmBridgeExtension
57
import com.android.build.api.dsl.LibraryExtension
68
import com.vanniktech.maven.publish.MavenPublishBaseExtension
79
import kotlinx.atomicfu.plugin.gradle.AtomicFUPluginExtension
810
import org.gradle.api.JavaVersion
911
import org.gradle.api.Plugin
1012
import org.gradle.api.Project
13+
import org.gradle.api.plugins.ExtensionAware
1114
import org.gradle.api.plugins.JavaPluginExtension
1215
import org.gradle.jvm.toolchain.JavaLanguageVersion
1316
import org.gradle.kotlin.dsl.configure
@@ -16,6 +19,7 @@ import org.gradle.kotlin.dsl.withType
1619
import org.jetbrains.dokka.gradle.DokkaTask
1720
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
1821
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
22+
import org.jetbrains.kotlin.gradle.plugin.cocoapods.CocoapodsExtension
1923
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
2024

2125
class KotlinMultiplatformConventionPlugin : Plugin<Project> {
@@ -28,17 +32,20 @@ class KotlinMultiplatformConventionPlugin : Plugin<Project> {
2832
apply("com.android.library")
2933
apply("com.vanniktech.maven.publish")
3034
apply("org.jetbrains.dokka")
35+
apply("co.touchlab.faktory.kmmbridge")
3136
apply("maven-publish")
37+
apply("org.jetbrains.kotlin.native.cocoapods")
3238
apply("kotlinx-atomicfu")
3339
apply("org.jetbrains.kotlinx.binary-compatibility-validator")
3440
}
3541

3642

3743
extensions.configure<KotlinMultiplatformExtension> {
3844

39-
androidTarget()
4045
applyDefaultHierarchyTemplate()
4146

47+
androidTarget()
48+
4249
jvm()
4350

4451
iosX64()
@@ -57,7 +64,7 @@ class KotlinMultiplatformConventionPlugin : Plugin<Project> {
5764
nodejs()
5865
}
5966

60-
jvmToolchain(17)
67+
jvmToolchain(11)
6168

6269
targets.all {
6370
compilations.all {
@@ -110,13 +117,15 @@ class KotlinMultiplatformConventionPlugin : Plugin<Project> {
110117
dependsOn(sourceSets.getByName("commonMain"))
111118
}
112119

113-
120+
configureCocoapods()
114121
}
115122

116123
configureKotlin()
117124
configureAndroid()
118125
configureDokka()
119126
configureMavenPublishing()
127+
addGithubPackagesRepository()
128+
configureKmmBridge()
120129
configureAtomicFu()
121130
}
122131
}
@@ -129,14 +138,13 @@ fun Project.configureKotlin() {
129138
fun Project.configureJava() {
130139
java {
131140
toolchain {
132-
languageVersion.set(JavaLanguageVersion.of(17))
141+
languageVersion.set(JavaLanguageVersion.of(11))
133142
}
134143
}
135144
}
136145

137146
fun Project.configureAndroid() {
138147
android {
139-
namespace = "org.mobilenativefoundation.store.$name"
140148
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
141149
compileSdk = Versions.COMPILE_SDK
142150
defaultConfig {
@@ -151,8 +159,8 @@ fun Project.configureAndroid() {
151159
}
152160

153161
compileOptions {
154-
sourceCompatibility = JavaVersion.VERSION_17
155-
targetCompatibility = JavaVersion.VERSION_17
162+
sourceCompatibility = JavaVersion.VERSION_11
163+
targetCompatibility = JavaVersion.VERSION_11
156164
}
157165
}
158166
}
@@ -172,11 +180,18 @@ object Versions {
172180

173181

174182
fun Project.configureMavenPublishing() = extensions.configure<MavenPublishBaseExtension> {
175-
publishToMavenCentral(automaticRelease = true)
183+
publishToMavenCentral()
176184
signAllPublications()
177185
}
178186

179187

188+
fun Project.configureKmmBridge() = extensions.configure<KmmBridgeExtension> {
189+
githubReleaseArtifacts()
190+
githubReleaseVersions()
191+
versionPrefix.set(Versions.STORE)
192+
spm()
193+
}
194+
180195
fun Project.configureAtomicFu() =
181196
extensions.configure<AtomicFUPluginExtension> {
182197
transformJvm = false
@@ -187,6 +202,18 @@ fun Project.configureDokka() = tasks.withType<DokkaTask>().configureEach {
187202
dokkaSourceSets.configureEach {
188203
reportUndocumented.set(false)
189204
skipDeprecated.set(true)
190-
jdkVersion.set(17)
205+
jdkVersion.set(11)
206+
}
207+
}
208+
209+
fun Project.android(name: String) {
210+
android {
211+
namespace = "org.mobilenativefoundation.store.$name"
212+
}
213+
}
214+
215+
fun KotlinMultiplatformExtension.configureCocoapods(){
216+
(this as ExtensionAware).extensions.configure(CocoapodsExtension::class.java) {
217+
version = Versions.STORE
191218
}
192219
}

0 commit comments

Comments
 (0)