From 76755a0d5fe662200817467680b0981116fffc01 Mon Sep 17 00:00:00 2001 From: qiaoyuang Date: Tue, 16 Jul 2024 13:43:36 +0800 Subject: [PATCH] Update version to 1.2.13 --- .gitignore | 3 +- CHANGELOG.md | 4 +++ build.gradle.kts | 21 +++-------- gradle.properties | 1 + gradle/libs.versions.toml | 23 +++++++++++++ gradle/wrapper/gradle-wrapper.properties | 2 +- mmkv-kotlin/MMKV_Kotlin.podspec | 8 ++--- mmkv-kotlin/build.gradle.kts | 44 ++++++++++-------------- settings.gradle.kts | 12 +++++-- 9 files changed, 68 insertions(+), 50 deletions(-) create mode 100644 gradle/libs.versions.toml diff --git a/.gitignore b/.gitignore index 9d4e33f..368046a 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,5 @@ .cxx local.properties /MMKV-Kotlin/build -.podspec \ No newline at end of file +.podspec +.kotlin \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 99eba22..1770c58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ - Date format: YYYY-MM-dd +## v1.2.13 / 2024-07-16 + +* Based on `Kotlin 1.9.24`, `MMKV 1.3.7` + ## v1.2.12 / 2024-04-30 * Based on `Kotlin 1.9.23`, `MMKV 1.3.5` diff --git a/build.gradle.kts b/build.gradle.kts index 305d69e..ecc902d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,18 +1,5 @@ -buildscript { - repositories { - gradlePluginPortal() - google() - mavenCentral() - } - dependencies { - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.23") - classpath("com.android.tools.build:gradle:8.2.2") - } -} - -allprojects { - repositories { - google() - mavenCentral() - } +plugins { + alias(libs.plugins.multiplatform).apply(false) + alias(libs.plugins.cocoapods).apply(false) + alias(libs.plugins.android.library).apply(false) } \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 1fdc972..7e8c8fb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,6 +5,7 @@ org.gradle.configureondemand=true org.gradle.workers.max=16 org.gradle.parallel=true org.gradle.caching=true +org.gradle.configuration-cache=true #Android android.useAndroidX=true diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 0000000..1d232f6 --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,23 @@ +[versions] + +kotlin = "1.9.24" +agp = "8.2.2" +mmkv = "1.3.7" +junit = "4.13.2" +androidx-test = "1.6.1" + +[libraries] + +mmkv = { group = "com.tencent", name = "mmkv-static", version.ref = "mmkv" } +junit = { group = "junit", name = "junit", version.ref = "junit" } +androidx-test-core = { group = "androidx.test", name = "core", version.ref = "androidx-test" } +androidx-test-runner = { group = "androidx.test", name = "runner", version.ref = "androidx-test" } +androidx-test-rules = { group = "androidx.test", name = "rules", version.ref = "androidx-test" } + +[plugins] + +multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } +cocoapods = { id = "org.jetbrains.kotlin.native.cocoapods", version.ref = "kotlin" } +kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize" } +android-library = { id = "com.android.library", version.ref = "agp" } +maven-publish = { id = "maven-publish" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 0f17998..d760955 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Tue Feb 22 11:03:04 CST 2022 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/mmkv-kotlin/MMKV_Kotlin.podspec b/mmkv-kotlin/MMKV_Kotlin.podspec index cfa62d5..121874a 100644 --- a/mmkv-kotlin/MMKV_Kotlin.podspec +++ b/mmkv-kotlin/MMKV_Kotlin.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = 'mmkv_kotlin' - spec.version = '1.2.12' + spec.version = '1.2.13' spec.homepage = 'Link to the Shared Module homepage' spec.source = { :http=> ''} spec.authors = '' @@ -8,9 +8,9 @@ Pod::Spec.new do |spec| spec.summary = 'Some description for the Shared Module' spec.vendored_frameworks = 'build/cocoapods/framework/MMKV_Kotlin.framework' spec.libraries = 'c++' - spec.ios.deployment_target = '17.4.1' - spec.osx.deployment_target = '14.2.1' - spec.dependency 'MMKV', '1.3.5' + spec.ios.deployment_target = '17.5.1' + spec.osx.deployment_target = '14.4.1' + spec.dependency 'MMKV', '1.3.7' if !Dir.exist?('build/cocoapods/framework/MMKV_Kotlin.framework') || Dir.empty?('build/cocoapods/framework/MMKV_Kotlin.framework') raise " diff --git a/mmkv-kotlin/build.gradle.kts b/mmkv-kotlin/build.gradle.kts index c30b005..93d9ff8 100644 --- a/mmkv-kotlin/build.gradle.kts +++ b/mmkv-kotlin/build.gradle.kts @@ -2,23 +2,21 @@ import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSetTree plugins { - kotlin("multiplatform") - kotlin("native.cocoapods") - id("com.android.library") - id("kotlin-parcelize") - id("maven-publish") + alias(libs.plugins.multiplatform) + alias(libs.plugins.cocoapods) + alias(libs.plugins.android.library) + alias(libs.plugins.kotlin.parcelize) + alias(libs.plugins.maven.publish) signing } -version = "1.2.12" +version = "1.2.13" group = "com.ctrip.flight.mmkv" -val mmkvVersion = "1.3.5" - +@OptIn(ExperimentalKotlinGradlePluginApi::class) kotlin { androidTarget { publishLibraryVariants("release") - @OptIn(ExperimentalKotlinGradlePluginApi::class) instrumentedTestVariant.sourceSetTree.set(KotlinSourceSetTree.test) } iosX64() @@ -27,26 +25,22 @@ kotlin { macosX64() macosArm64() - targets.configureEach { - compilations.configureEach { - compilerOptions.configure { - freeCompilerArgs.add("-Xexpect-actual-classes") - } - } + compilerOptions { + freeCompilerArgs.add("-Xexpect-actual-classes") } cocoapods { summary = "Some description for the Shared Module" homepage = "Link to the Shared Module homepage" - ios.deploymentTarget = "17.4.1" - osx.deploymentTarget = "14.2.1" + ios.deploymentTarget = "17.5.1" + osx.deploymentTarget = "14.4.1" framework { baseName = "MMKV-Kotlin" isStatic = true } pod( name = "MMKV", - version = mmkvVersion, + version = libs.versions.mmkv.get(), ) } @@ -61,16 +55,16 @@ kotlin { } val androidMain by getting { dependencies { - api("com.tencent:mmkv-static:$mmkvVersion") + api(libs.mmkv) } } val androidInstrumentedTest by getting { dependencies { implementation(kotlin("test-junit")) - implementation("junit:junit:4.13.2") - implementation("androidx.test:core:1.5.0") - implementation("androidx.test:runner:1.5.2") - implementation("androidx.test:rules:1.5.0") + implementation(libs.junit) + implementation(libs.androidx.test.core) + implementation(libs.androidx.test.runner) + implementation(libs.androidx.test.rules) } } } @@ -78,7 +72,7 @@ kotlin { android { namespace = "com.ctrip.flight.mmkv" - compileSdk = 33 + compileSdk = 35 defaultConfig { minSdk = 23 testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" @@ -103,7 +97,7 @@ publishing { licenses { license { name.set("The Apache License, Version 2.0") - url.set("http://www.apache.org/licenses/LICENSE-2.0.txt") + url.set("https://www.apache.org/licenses/LICENSE-2.0.txt") } } developers { diff --git a/settings.gradle.kts b/settings.gradle.kts index 5f2db55..0962a40 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,3 +1,6 @@ +rootProject.name = "mmkv-kotlin" +include(":mmkv-kotlin") + pluginManagement { repositories { google() @@ -6,5 +9,10 @@ pluginManagement { } } -rootProject.name = "mmkv-kotlin" -include(":mmkv-kotlin") \ No newline at end of file +dependencyResolutionManagement { + @Suppress("UnstableApiUsage") + repositories { + google() + mavenCentral() + } +} \ No newline at end of file