Skip to content

Commit

Permalink
Merge pull request #97 from qiaoyuang/main
Browse files Browse the repository at this point in the history
Update the dependencies management
  • Loading branch information
qiaoyuang authored Jul 17, 2024
2 parents 4872fdd + fde1633 commit 1868940
Show file tree
Hide file tree
Showing 10 changed files with 94 additions and 71 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
<!--* Update `kotlinx.serialization`'s version to `1.7.1`-->

### sqllin-driver

* Update the `sqlite-jdbc`'s version to `3.46.0.0`

## v1.3.2 / 2024-06-18

### All
Expand Down
24 changes: 6 additions & 18 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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
}
6 changes: 0 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
35 changes: 35 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -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" }
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 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
14 changes: 6 additions & 8 deletions sample/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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)
}
}
}
Expand Down
24 changes: 13 additions & 11 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
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()
mavenCentral()
}
}

rootProject.name = "SQLlin"
include(":sqllin-driver")
include(":sqllin-dsl")
include(":sqllin-processor")
include(":sample")
dependencyResolutionManagement {
@Suppress("UnstableApiUsage")
repositories {
google()
mavenCentral()
}
}
20 changes: 9 additions & 11 deletions sqllin-driver/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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)
}
}
}
Expand Down
22 changes: 10 additions & 12 deletions sqllin-dsl/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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 {
Expand All @@ -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)
}
}
}
Expand Down
7 changes: 3 additions & 4 deletions sqllin-processor/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
kotlin("jvm")
id("maven-publish")
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.maven.publish)
signing
}

Expand All @@ -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
Expand Down

0 comments on commit 1868940

Please sign in to comment.