diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6f81dd60b..7deaf5ae9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,11 +59,12 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v4 with: distribution: 'zulu' - java-version: '11' + java-version: '17' + cache: 'gradle' - name: Grant execute permission for Gradlew run: chmod +x gradlew diff --git a/.github/workflows/create_swift_package.yml b/.github/workflows/create_swift_package.yml deleted file mode 100644 index dca0c1f99..000000000 --- a/.github/workflows/create_swift_package.yml +++ /dev/null @@ -1,7 +0,0 @@ -name: Create Swift Package - -on: - workflow_dispatch: -jobs: - publish: - uses: touchlab/KMMBridgeGithubWorkflow/.github/workflows/faktorybuildbranches.yml@v0.6 \ No newline at end of file diff --git a/RELEASING.md b/RELEASING.md index 4d42171d9..4d4ad538c 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -2,27 +2,22 @@ Releasing ======== 1. Change the version in top level `gradle.properties` to a non-SNAPSHOT version. -2. Update the `cocoapods` version in `build.gradle.kts` in `:store`. -3. Modify `create_swift_package.yml` workflow. - * https://github.com/MobileNativeFoundation/Store/blob/e526400cdf51aa2f78b6b7e9e87f4a6845e6dcea/.github/workflows/create_swift_package.yml -4. Update the `CHANGELOG.md` for the impending release. -5. Update the `README.md` with the new version. -6. `git commit -sam "Prepare for release X.Y.Z."` (where X.Y.Z is the new version) -7. `git tag -a X.Y.X -m "Version X.Y.Z"` (where X.Y.Z is the new version) +2. Update the `CHANGELOG.md` for the impending release. +3. Update the `README.md` with the new version. +4. `git commit -sam "Prepare for release X.Y.Z."` (where X.Y.Z is the new version) +5. `git tag -a X.Y.X -m "Version X.Y.Z"` (where X.Y.Z is the new version) * Run `git tag` to verify it. -8. `git push && git push --tags` +6. `git push && git push --tags` * This should be pushed to your fork. -9. Create a PR with this commit and merge it. -10. Update the top level `build.gradle` to the next SNAPSHOT version. -11. Modify `create_swift_package.yml` workflow to only run manually. - * https://github.com/MobileNativeFoundation/Store/blob/de9ed1764408eeaafe5e58fe602205c875a8b0b0/.github/workflows/create_swift_package.yml -12. `git commit -am "Prepare next development version."` -13. Create a PR with this commit and merge it. -14. Login to Sonatype to promote the artifacts https://central.sonatype.org/pages/releasing-the-deployment.html +7. Create a PR with this commit and merge it. +8. Update the top level `build.gradle` to the next SNAPSHOT version. +9. `git commit -am "Prepare next development version."` +10. Create a PR with this commit and merge it. +11. Login to Sonatype to promote the artifacts https://central.sonatype.org/pages/releasing-the-deployment.html * This part is automated. If it fails in CI, follow the steps below. * Click on Staging Repositories under Build Promotion * Select all the Repositories that contain the content you want to release * Click on Close and refresh until the Release button is active * Click Release and submit -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) +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) \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index b3dfe068a..806a21c31 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -19,7 +19,6 @@ buildscript { classpath(libs.jacoco.gradle.plugin) classpath(libs.maven.publish.plugin) classpath(libs.atomic.fu.gradle.plugin) - classpath(libs.kmmBridge.gradle.plugin) classpath(libs.binary.compatibility.validator) } } @@ -49,13 +48,13 @@ subprojects { tasks { withType { kotlinOptions { - jvmTarget = "11" + jvmTarget = "17" } } withType().configureEach { - sourceCompatibility = JavaVersion.VERSION_11.name - targetCompatibility = JavaVersion.VERSION_11.name + sourceCompatibility = JavaVersion.VERSION_17.name + targetCompatibility = JavaVersion.VERSION_17.name } } diff --git a/cache/api/android/cache.api b/cache/api/android/cache.api index e64d0ebd9..c7cdabcb3 100644 --- a/cache/api/android/cache.api +++ b/cache/api/android/cache.api @@ -1,10 +1,3 @@ -public final class org/mobilenativefoundation/store/cache/BuildConfig { - public static final field BUILD_TYPE Ljava/lang/String; - public static final field DEBUG Z - public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String; - public fun ()V -} - public abstract interface class org/mobilenativefoundation/store/cache5/Cache { public abstract fun getAllPresent ()Ljava/util/Map; public abstract fun getAllPresent (Ljava/util/List;)Ljava/util/Map; diff --git a/core/api/android/core.api b/core/api/android/core.api index 9203b623c..7a452a0a2 100644 --- a/core/api/android/core.api +++ b/core/api/android/core.api @@ -1,10 +1,3 @@ -public final class org/mobilenativefoundation/store/core/BuildConfig { - public static final field BUILD_TYPE Ljava/lang/String; - public static final field DEBUG Z - public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String; - public fun ()V -} - public abstract interface annotation class org/mobilenativefoundation/store/core5/ExperimentalStoreApi : java/lang/annotation/Annotation { } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index ab936696e..226b34b8f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,35 +1,30 @@ [versions] androidMinSdk = "24" androidCompileSdk = "33" -androidGradlePlugin = "7.4.2" +androidGradlePlugin = "8.0.2" androidTargetSdk = "33" atomicFu = "0.24.0" -baseKotlin = "2.0.20" +baseKotlin = "2.1.21" dokkaGradlePlugin = "1.9.20" ktlintGradle = "12.1.0" jacocoGradlePlugin = "0.8.12" -mavenPublishPlugin = "0.22.0" +mavenPublishPlugin = "0.34.0" moleculeGradlePlugin = "1.2.1" -pagingCompose = "3.3.0-alpha02" -pagingRuntime = "3.2.1" spotlessPluginGradle = "6.4.1" junit = "4.13.2" kotlinxCoroutines = "1.8.1" kotlinxSerialization = "1.6.3" kermit = "2.0.5" testCore = "1.6.1" -kmmBridge = "0.3.2" ktlint = "0.39.0" kover = "0.9.0-RC" store = "5.1.0-alpha07" truth = "1.1.3" turbine = "1.2.0" -binary-compatibility-validator = "0.15.0-Beta.2" +binary-compatibility-validator = "0.16.3" [libraries] android-gradle-plugin = { group = "com.android.tools.build", name = "gradle", version.ref = "androidGradlePlugin" } -androidx-paging-compose = { module = "androidx.paging:paging-compose", version.ref = "pagingCompose" } -androidx-paging-runtime = { module = "androidx.paging:paging-runtime", version.ref = "pagingRuntime" } kotlin-gradle-plugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "baseKotlin" } kotlin-serialization-plugin = { group = "org.jetbrains.kotlin", name = "kotlin-serialization", version.ref = "baseKotlin" } dokka-gradle-plugin = { group = "org.jetbrains.dokka", name = "dokka-gradle-plugin", version.ref = "dokkaGradlePlugin" } @@ -39,7 +34,6 @@ maven-publish-plugin = { group = "com.vanniktech", name = "gradle-maven-publish- kover-gradle-plugin = {group = "org.jetbrains.kotlinx", name = "kover-gradle-plugin", version.ref = "kover"} atomic-fu-gradle-plugin = { group = "org.jetbrains.kotlinx", name = "atomicfu-gradle-plugin", version.ref = "atomicFu" } -kmmBridge-gradle-plugin = { group = "co.touchlab.faktory.kmmbridge", name = "co.touchlab.faktory.kmmbridge.gradle.plugin", version.ref = "kmmBridge" } kotlinx-atomic-fu = { group = "org.jetbrains.kotlinx", name = "atomicfu", version.ref = "atomicFu" } kotlin-stdlib = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib", version.ref = "baseKotlin" } diff --git a/multicast/api/android/multicast.api b/multicast/api/android/multicast.api index 5eadf9771..986699944 100644 --- a/multicast/api/android/multicast.api +++ b/multicast/api/android/multicast.api @@ -1,10 +1,3 @@ -public final class org/mobilenativefoundation/store/multicast/BuildConfig { - public static final field BUILD_TYPE Ljava/lang/String; - public static final field DEBUG Z - public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String; - public fun ()V -} - public final class org/mobilenativefoundation/store/multicast5/Multicaster { public fun (Lkotlinx/coroutines/CoroutineScope;ILkotlinx/coroutines/flow/Flow;ZZLkotlin/jvm/functions/Function2;)V public synthetic fun (Lkotlinx/coroutines/CoroutineScope;ILkotlinx/coroutines/flow/Flow;ZZLkotlin/jvm/functions/Function2;ILkotlin/jvm/internal/DefaultConstructorMarker;)V diff --git a/rx2/api/rx2.api b/rx2/api/rx2.api index 9a26b9d7a..8c2b6797c 100644 --- a/rx2/api/rx2.api +++ b/rx2/api/rx2.api @@ -1,10 +1,3 @@ -public final class org/mobilenativefoundation/store/rx2/BuildConfig { - public static final field BUILD_TYPE Ljava/lang/String; - public static final field DEBUG Z - public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String; - public fun ()V -} - public final class org/mobilenativefoundation/store/rx2/RxFetcherKt { public static final fun ofFlowable (Lorg/mobilenativefoundation/store/store5/Fetcher$Companion;Lkotlin/jvm/functions/Function1;)Lorg/mobilenativefoundation/store/store5/Fetcher; public static final fun ofResultFlowable (Lorg/mobilenativefoundation/store/store5/Fetcher$Companion;Lkotlin/jvm/functions/Function1;)Lorg/mobilenativefoundation/store/store5/Fetcher; diff --git a/store/api/android/store.api b/store/api/android/store.api index 45a91c111..cc92814fe 100644 --- a/store/api/android/store.api +++ b/store/api/android/store.api @@ -14,13 +14,6 @@ public final class org/mobilenativefoundation/store/store5/Bookkeeper$DefaultImp public static synthetic fun setLastFailedSync$default (Lorg/mobilenativefoundation/store/store5/Bookkeeper;Ljava/lang/Object;JLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; } -public final class org/mobilenativefoundation/store/store5/BuildConfig { - public static final field BUILD_TYPE Ljava/lang/String; - public static final field DEBUG Z - public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String; - public fun ()V -} - public abstract interface class org/mobilenativefoundation/store/store5/Clear { } diff --git a/store/build.gradle.kts b/store/build.gradle.kts index 4d9096f8e..eb6f1843e 100644 --- a/store/build.gradle.kts +++ b/store/build.gradle.kts @@ -1,6 +1,3 @@ -import org.gradle.internal.impldep.org.testng.reporters.XMLUtils.xml - - plugins { id("org.mobilenativefoundation.store.multiplatform") alias(libs.plugins.kover) diff --git a/tooling/plugins/build.gradle.kts b/tooling/plugins/build.gradle.kts index 49a28d78c..1d4fc618a 100644 --- a/tooling/plugins/build.gradle.kts +++ b/tooling/plugins/build.gradle.kts @@ -5,11 +5,11 @@ plugins { group = "org.mobilenativefoundation.store" java { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 toolchain { - languageVersion.set(JavaLanguageVersion.of(11)) + languageVersion.set(JavaLanguageVersion.of(17)) } } @@ -18,7 +18,6 @@ dependencies { compileOnly(libs.kotlin.gradle.plugin) compileOnly(libs.dokka.gradle.plugin) compileOnly(libs.maven.publish.plugin) - compileOnly(libs.kmmBridge.gradle.plugin) compileOnly(libs.atomic.fu.gradle.plugin) } diff --git a/tooling/plugins/src/main/kotlin/org/mobilenativefoundation/store/tooling/plugins/AndroidConventionPlugin.kt b/tooling/plugins/src/main/kotlin/org/mobilenativefoundation/store/tooling/plugins/AndroidConventionPlugin.kt index a4cdfcf31..ca96b4bd8 100644 --- a/tooling/plugins/src/main/kotlin/org/mobilenativefoundation/store/tooling/plugins/AndroidConventionPlugin.kt +++ b/tooling/plugins/src/main/kotlin/org/mobilenativefoundation/store/tooling/plugins/AndroidConventionPlugin.kt @@ -16,7 +16,6 @@ class AndroidConventionPlugin : Plugin { apply("com.vanniktech.maven.publish") apply("org.jetbrains.dokka") apply("maven-publish") - apply("org.jetbrains.kotlin.native.cocoapods") apply("org.jetbrains.kotlinx.binary-compatibility-validator") } @@ -38,8 +37,8 @@ class AndroidConventionPlugin : Plugin { } compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } } diff --git a/tooling/plugins/src/main/kotlin/org/mobilenativefoundation/store/tooling/plugins/KotlinMultiplatformConventionPlugin.kt b/tooling/plugins/src/main/kotlin/org/mobilenativefoundation/store/tooling/plugins/KotlinMultiplatformConventionPlugin.kt index 276e3d049..35927daa7 100644 --- a/tooling/plugins/src/main/kotlin/org/mobilenativefoundation/store/tooling/plugins/KotlinMultiplatformConventionPlugin.kt +++ b/tooling/plugins/src/main/kotlin/org/mobilenativefoundation/store/tooling/plugins/KotlinMultiplatformConventionPlugin.kt @@ -2,8 +2,6 @@ package org.mobilenativefoundation.store.tooling.plugins -import addGithubPackagesRepository -import co.touchlab.faktory.KmmBridgeExtension import com.android.build.api.dsl.LibraryExtension import com.vanniktech.maven.publish.MavenPublishBaseExtension import kotlinx.atomicfu.plugin.gradle.AtomicFUPluginExtension @@ -30,9 +28,7 @@ class KotlinMultiplatformConventionPlugin : Plugin { apply("com.android.library") apply("com.vanniktech.maven.publish") apply("org.jetbrains.dokka") - apply("co.touchlab.faktory.kmmbridge") apply("maven-publish") - apply("org.jetbrains.kotlin.native.cocoapods") apply("kotlinx-atomicfu") apply("org.jetbrains.kotlinx.binary-compatibility-validator") } @@ -40,9 +36,8 @@ class KotlinMultiplatformConventionPlugin : Plugin { extensions.configure { - applyDefaultHierarchyTemplate() - androidTarget() + applyDefaultHierarchyTemplate() jvm() @@ -62,7 +57,7 @@ class KotlinMultiplatformConventionPlugin : Plugin { nodejs() } - jvmToolchain(11) + jvmToolchain(17) targets.all { compilations.all { @@ -122,8 +117,6 @@ class KotlinMultiplatformConventionPlugin : Plugin { configureAndroid() configureDokka() configureMavenPublishing() - addGithubPackagesRepository() - configureKmmBridge() configureAtomicFu() } } @@ -136,13 +129,14 @@ fun Project.configureKotlin() { fun Project.configureJava() { java { toolchain { - languageVersion.set(JavaLanguageVersion.of(11)) + languageVersion.set(JavaLanguageVersion.of(17)) } } } fun Project.configureAndroid() { android { + namespace = "org.mobilenativefoundation.store.$name" sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml") compileSdk = Versions.COMPILE_SDK defaultConfig { @@ -157,8 +151,8 @@ fun Project.configureAndroid() { } compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } } } @@ -183,13 +177,6 @@ fun Project.configureMavenPublishing() = extensions.configure { - githubReleaseArtifacts() - githubReleaseVersions() - versionPrefix.set(Versions.STORE) - spm() -} - fun Project.configureAtomicFu() = extensions.configure { transformJvm = false @@ -200,12 +187,6 @@ fun Project.configureDokka() = tasks.withType().configureEach { dokkaSourceSets.configureEach { reportUndocumented.set(false) skipDeprecated.set(true) - jdkVersion.set(11) + jdkVersion.set(17) } -} - -fun Project.android(name: String) { - android { - namespace = "org.mobilenativefoundation.store.$name" - } -} +} \ No newline at end of file