diff --git a/CHANGELOG.md b/CHANGELOG.md index b5aedde..a5e2a1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,17 @@ - Date format: YYYY-MM-dd +## vx.x.x / 2024-xx-xx + +### sqllin-dsl + +* Update `kotlinx.coroutines`'s version to `1.8.1` + + +### sqllin-driver + +* Update the `sqlite-jdbc`'s version to `3.46.0.0` + ## v1.3.2 / 2024-06-18 ### All diff --git a/build.gradle.kts b/build.gradle.kts index c2f3b8b..53d2bda 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,19 +1,7 @@ -buildscript { - repositories { - gradlePluginPortal() - google() - mavenCentral() - } - dependencies { - val kotlinVersion: String by project - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion") - classpath("com.android.tools.build:gradle:8.2.2") - } -} - -allprojects { - repositories { - google() - mavenCentral() - } +plugins { + alias(libs.plugins.kotlin.multiplatform) apply false + alias(libs.plugins.kotlin.jvm) apply false + alias(libs.plugins.kotlinx.serialization) apply false + alias(libs.plugins.android.library) apply false + alias(libs.plugins.ksp) apply false } \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index e680c9b..8710609 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,12 +1,6 @@ VERSION=1.3.2 GROUP=com.ctrip.kotlin -kotlinVersion=1.9.24 -kspVersion=1.9.24-1.0.20 -serializationVersion=1.6.3 -coroutinesVersion=1.8.0 -androidxAnnotationVersion=1.7.1 - #Maven Publish Information githubURL=https://github.com/ctripcorp/SQLlin licenseName=The Apache License, Version 2.0 diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 0000000..8e6631e --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,35 @@ +[versions] + +kotlin = "1.9.24" +agp = "8.2.2" +ksp = "1.9.24-1.0.20" +serialization = "1.6.3" +coroutines = "1.8.1" +androidx-annotation = "1.8.0" +androidx-test = "1.6.1" +sqlite-jdbc = "3.46.0.0" + +[libraries] + +ksp = { group = "com.google.devtools.ksp", name= "symbol-processing-api", version.ref = "ksp" } + +kotlinx-serialization = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-core", version.ref = "serialization" } +kotlinx-coroutines = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "coroutines" } + +androidx-annotation = { group = "androidx.annotation", name = "annotation", version.ref = "androidx-annotation" } +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" } + +sqlite-jdbc = { group = "org.xerial", name = "sqlite-jdbc", version.ref = "sqlite-jdbc" } + + + +[plugins] + +kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } +kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } +kotlinx-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } +ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" } +android-library = { id = "com.android.library", version.ref = "agp" } +maven-publish = { id = "maven-publish" } \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e60ae3d..133947a 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Tue Mar 08 15:11:46 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 \ No newline at end of file diff --git a/sample/build.gradle.kts b/sample/build.gradle.kts index 187fb96..b2603dc 100644 --- a/sample/build.gradle.kts +++ b/sample/build.gradle.kts @@ -1,10 +1,10 @@ import org.jetbrains.kotlin.gradle.dsl.KotlinCompile plugins { - kotlin("multiplatform") - kotlin("plugin.serialization") - id("com.android.library") - id("com.google.devtools.ksp") + alias(libs.plugins.kotlin.multiplatform) + alias(libs.plugins.kotlinx.serialization) + alias(libs.plugins.android.library) + alias(libs.plugins.ksp) } version = "1.0" @@ -32,10 +32,8 @@ kotlin { kotlin.srcDir("build/generated/ksp/metadata/commonMain/kotlin") dependencies { implementation(project(":sqllin-dsl")) - val serializationVersion: String by project - implementation("org.jetbrains.kotlinx:kotlinx-serialization-core:${serializationVersion}") - val coroutinesVersion: String by project - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion") + implementation(libs.kotlinx.serialization) + implementation(libs.kotlinx.coroutines) } } } diff --git a/settings.gradle.kts b/settings.gradle.kts index 3a92a04..be2fdda 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,10 +1,10 @@ +rootProject.name = "SQLlin" +include(":sqllin-driver") +include(":sqllin-dsl") +include(":sqllin-processor") +include(":sample") + pluginManagement { - val kspVersion: String by settings - val kotlinVersion: String by settings - plugins { - id("com.google.devtools.ksp") version kspVersion apply false - kotlin("plugin.serialization") version kotlinVersion - } repositories { google() gradlePluginPortal() @@ -12,8 +12,10 @@ pluginManagement { } } -rootProject.name = "SQLlin" -include(":sqllin-driver") -include(":sqllin-dsl") -include(":sqllin-processor") -include(":sample") +dependencyResolutionManagement { + @Suppress("UnstableApiUsage") + repositories { + google() + mavenCentral() + } +} \ No newline at end of file diff --git a/sqllin-driver/build.gradle.kts b/sqllin-driver/build.gradle.kts index 11501fa..1dbb209 100644 --- a/sqllin-driver/build.gradle.kts +++ b/sqllin-driver/build.gradle.kts @@ -4,9 +4,9 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget import org.jetbrains.kotlin.konan.target.HostManager plugins { - kotlin("multiplatform") - id("com.android.library") - id("maven-publish") + alias(libs.plugins.kotlin.multiplatform) + alias(libs.plugins.android.library) + alias(libs.plugins.maven.publish) signing } @@ -75,27 +75,25 @@ kotlin { val commonTest by getting { dependencies { implementation(kotlin("test")) - val coroutinesVersion: String by project - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion") + implementation(libs.kotlinx.coroutines) } } val androidMain by getting { dependencies { - val androidxAnnotationVersion: String by project - implementation("androidx.annotation:annotation:${androidxAnnotationVersion}") + implementation(libs.androidx.annotation) } } val androidInstrumentedTest by getting { dependencies { - implementation("androidx.test:core:1.5.0") - implementation("androidx.test:runner:1.5.2") - implementation("androidx.test:rules:1.5.0") + implementation(libs.androidx.test.core) + implementation(libs.androidx.test.runner) + implementation(libs.androidx.test.rules) } } val jvmMain by getting { dependencies { - implementation("org.xerial:sqlite-jdbc:3.45.3.0") + implementation(libs.sqlite.jdbc) } } } diff --git a/sqllin-dsl/build.gradle.kts b/sqllin-dsl/build.gradle.kts index a365264..9b57215 100644 --- a/sqllin-dsl/build.gradle.kts +++ b/sqllin-dsl/build.gradle.kts @@ -4,11 +4,11 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget import org.jetbrains.kotlin.konan.target.HostManager plugins { - kotlin("multiplatform") - kotlin("plugin.serialization") - id("com.google.devtools.ksp") - id("com.android.library") - id("maven-publish") + alias(libs.plugins.kotlin.multiplatform) + alias(libs.plugins.kotlinx.serialization) + alias(libs.plugins.android.library) + alias(libs.plugins.ksp) + alias(libs.plugins.maven.publish) signing } @@ -77,10 +77,8 @@ kotlin { val commonMain by getting { dependencies { api(project(":sqllin-driver")) - val serializationVersion: String by project - implementation("org.jetbrains.kotlinx:kotlinx-serialization-core:${serializationVersion}") - val coroutinesVersion: String by project - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion") + implementation(libs.kotlinx.serialization) + implementation(libs.kotlinx.coroutines) } } val commonTest by getting { @@ -90,9 +88,9 @@ kotlin { } val androidInstrumentedTest by getting { dependencies { - implementation("androidx.test:core:1.5.0") - implementation("androidx.test:runner:1.5.2") - implementation("androidx.test:rules:1.5.0") + implementation(libs.androidx.test.core) + implementation(libs.androidx.test.runner) + implementation(libs.androidx.test.rules) } } } diff --git a/sqllin-processor/build.gradle.kts b/sqllin-processor/build.gradle.kts index 00932c0..5b0dd36 100644 --- a/sqllin-processor/build.gradle.kts +++ b/sqllin-processor/build.gradle.kts @@ -1,6 +1,6 @@ plugins { - kotlin("jvm") - id("maven-publish") + alias(libs.plugins.kotlin.jvm) + alias(libs.plugins.maven.publish) signing } @@ -20,8 +20,7 @@ java { } dependencies { - val kspVersion: String by project - implementation("com.google.devtools.ksp:symbol-processing-api:$kspVersion") + implementation(libs.ksp) } val NEXUS_USERNAME: String by project