Skip to content

Commit

Permalink
Merge pull request #36 from qiaoyuang/main
Browse files Browse the repository at this point in the history
Update version to 1.2.13
  • Loading branch information
qiaoyuang authored Jul 16, 2024
2 parents 35d7252 + 76755a0 commit af429c2
Show file tree
Hide file tree
Showing 9 changed files with 68 additions and 50 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@
.cxx
local.properties
/MMKV-Kotlin/build
.podspec
.podspec
.kotlin
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
21 changes: 4 additions & 17 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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)
}
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
23 changes: 23 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -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" }
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
8 changes: 4 additions & 4 deletions mmkv-kotlin/MMKV_Kotlin.podspec
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
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 = ''
spec.license = ''
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 "
Expand Down
44 changes: 19 additions & 25 deletions mmkv-kotlin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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(),
)
}

Expand All @@ -61,24 +55,24 @@ 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)
}
}
}
}

android {
namespace = "com.ctrip.flight.mmkv"
compileSdk = 33
compileSdk = 35
defaultConfig {
minSdk = 23
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
Expand All @@ -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 {
Expand Down
12 changes: 10 additions & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
rootProject.name = "mmkv-kotlin"
include(":mmkv-kotlin")

pluginManagement {
repositories {
google()
Expand All @@ -6,5 +9,10 @@ pluginManagement {
}
}

rootProject.name = "mmkv-kotlin"
include(":mmkv-kotlin")
dependencyResolutionManagement {
@Suppress("UnstableApiUsage")
repositories {
google()
mavenCentral()
}
}

0 comments on commit af429c2

Please sign in to comment.