Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 8 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@ on:
branches:
- '*'

env:
ORG_GRADLE_PROJECT_NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
ORG_GRADLE_PROJECT_SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}

jobs:

build-on-macos:
Expand Down Expand Up @@ -70,30 +63,30 @@ jobs:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-35
key: avd-36

- name: Create AVD and Generate Snapshot for Caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 35
api-level: 36
target: google_apis
arch: x86_64
profile: pixel_6
emulator-build: 13373845
emulator-build: 13701740
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: echo "Generated AVD snapshot for caching."

- name: Run Android 15 Instrumented Tests
- name: Run Android 16 Instrumented Tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 35
api-level: 36
target: google_apis
arch: x86_64
profile: pixel_6
emulator-build: 13373845
emulator-build: 13701740
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
Expand Down Expand Up @@ -239,7 +232,7 @@ jobs:
target: default
arch: x86_64
profile: pixel_2
emulator-build: 13373845
emulator-build: 13701740
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
Expand All @@ -252,7 +245,7 @@ jobs:
target: default
arch: x86_64
profile: pixel_2
emulator-build: 13373845
emulator-build: 13701740
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ on:
workflow_dispatch:

env:
ORG_GRADLE_PROJECT_NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
ORG_GRADLE_PROJECT_SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_KEY_PASSWORD }}

jobs:

Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
run: ./gradlew :sqllin-dsl:mingwX64MainKlibrary

- name: Publish to MavenCentral
run: ./gradlew :sqllin-driver:publishMingwX64PublicationToMavenRepository && ./gradlew :sqllin-dsl:publishMingwX64PublicationToMavenRepository
run: ./gradlew :sqllin-driver:publishMingwX64PublicationToMavenCentralRepository && ./gradlew :sqllin-dsl:publishMingwX64PublicationToMavenCentralRepository

build-on-linux:
runs-on: ubuntu-latest
Expand Down
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@

- Date format: YYYY-MM-dd

## 1.4.4 / 2025-07-07

### All

* Update `Kotlin`'s version to `2.2.0`

### sqllin-dsl

* Update `kotlinx.serialization`'s version to `1.9.0`

### sqllin-driver

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

### sqllin-processor

* Update `KSP`'s version to `2.2.0-2.0.2`

## v1.4.3 / 2025-06-02

### All
Expand Down
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ plugins {
alias(libs.plugins.kotlinx.serialization) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.vanniktech.maven.publish) apply false
}
6 changes: 4 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
VERSION=1.4.3
GROUP=com.ctrip.kotlin
VERSION=1.4.4
GROUP_ID=com.ctrip.kotlin

#Maven Publishing Information
githubURL=https://github.com/ctripcorp/SQLlin
Expand Down Expand Up @@ -28,4 +28,6 @@ kotlin.mpp.stability.nowarn=true
kotlin.mpp.enableCInteropCommonization=true
kotlin.natvie.increment=true
kotlin.jvm.target.validation.mode=warning
kotlin.native.binary.pagedAllocator=false
kotlin.native.binary.latin1Strings=true
#kotlin.compiler.execution.strategy=out-of-process
16 changes: 10 additions & 6 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
[versions]

kotlin = "2.1.21"
agp = "8.9.3"
ksp = "2.1.21-2.0.1"
serialization = "1.8.1"
kotlin = "2.2.0"
agp = "8.10.1"
ksp = "2.2.0-2.0.2"
serialization = "1.9.0"
coroutines = "1.10.2"
androidx-annotation = "1.9.1"
androidx-test = "1.6.1"
androidx-test-runner = "1.6.2"
sqlite-jdbc = "3.49.1.0"
sqlite-jdbc = "3.50.2.0"
desugar-jdk-libs = "2.1.5"
jvm-toolchain = "21"
android-sdk-compile = "36"
android-sdk-min = "23"
vanniktech-maven-publish = "0.33.0"

[libraries]

Expand All @@ -34,4 +38,4 @@ 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" }
vanniktech-maven-publish = { id = "com.vanniktech.maven.publish", version.ref = "vanniktech-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.14.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
4 changes: 2 additions & 2 deletions publish_apple_android_jvm.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Publish artifacts on macOS env
./gradlew :sqllin-driver:publishAllPublicationsToMavenRepository -PonCICD
./gradlew :sqllin-dsl:publishAllPublicationsToMavenRepository -PonCICD
./gradlew :sqllin-driver:publishAllPublicationsToMavenCentralRepository -PonCICD
./gradlew :sqllin-dsl:publishAllPublicationsToMavenCentralRepository -PonCICD
10 changes: 5 additions & 5 deletions publish_linux_processor.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Publish artifacts on Linux env
./gradlew :sqllin-driver:publishLinuxX64PublicationToMavenRepository
./gradlew :sqllin-driver:publishLinuxArm64PublicationToMavenRepository
./gradlew :sqllin-processor:publishProcessorPublicationToMavenRepository
./gradlew :sqllin-dsl:publishLinuxX64PublicationToMavenRepository
./gradlew :sqllin-dsl:publishLinuxArm64PublicationToMavenRepository
./gradlew :sqllin-driver:publishLinuxX64PublicationToMavenCentralRepository
./gradlew :sqllin-driver:publishLinuxArm64PublicationToMavenCentralRepository
./gradlew :sqllin-processor:publishMavenPublicationToMavenCentralRepository
./gradlew :sqllin-dsl:publishLinuxX64PublicationToMavenCentralRepository
./gradlew :sqllin-dsl:publishLinuxArm64PublicationToMavenCentralRepository
8 changes: 4 additions & 4 deletions sample/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {
version = "1.0"

kotlin {
jvmToolchain(21)
jvmToolchain(libs.versions.jvm.toolchain.get().toInt())
androidTarget {
publishLibraryVariants("release")
}
Expand All @@ -23,7 +23,7 @@ kotlin {
iosSimulatorArm64()

compilerOptions {
freeCompilerArgs.add("-Xexpect-actual-classes")
freeCompilerArgs.addAll("-Xexpect-actual-classes", "-Xcontext-parameters", "-Xnested-type-aliases")
}

sourceSets {
Expand All @@ -43,9 +43,9 @@ kotlin {

android {
namespace = "com.ctrip.sqllin.sample"
compileSdk = 35
compileSdk = libs.versions.android.sdk.compile.get().toInt()
defaultConfig {
minSdk = 23
minSdk = libs.versions.android.sdk.min.get().toInt()
}
compileOptions {
isCoreLibraryDesugaringEnabled = true
Expand Down
108 changes: 43 additions & 65 deletions sqllin-driver/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,19 @@ import org.jetbrains.kotlin.konan.target.HostManager
plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.android.library)
alias(libs.plugins.maven.publish)
signing
alias(libs.plugins.vanniktech.maven.publish)
}

val GROUP: String by project
val GROUP_ID: String by project
val VERSION: String by project

group = GROUP
group = GROUP_ID
version = VERSION

@OptIn(ExperimentalKotlinGradlePluginApi::class)
kotlin {
explicitApi()
jvmToolchain(21)
jvmToolchain(libs.versions.jvm.toolchain.get().toInt())
androidTarget {
publishLibraryVariants("release")
instrumentedTestVariant.sourceSetTree.set(KotlinSourceSetTree.test)
Expand Down Expand Up @@ -57,7 +56,7 @@ kotlin {
}

compilerOptions {
freeCompilerArgs.add("-Xexpect-actual-classes")
freeCompilerArgs.addAll("-Xexpect-actual-classes", "-Xcontext-parameters", "-Xnested-type-aliases")
}

sourceSets {
Expand Down Expand Up @@ -101,9 +100,9 @@ gradle.taskGraph.whenReady {

android {
namespace = "com.ctrip.sqllin.driver"
compileSdk = 35
compileSdk = libs.versions.android.sdk.compile.get().toInt()
defaultConfig {
minSdk = 23
minSdk = libs.versions.android.sdk.min.get().toInt()
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
compileOptions {
Expand All @@ -129,66 +128,45 @@ dependencies {
coreLibraryDesugaring(libs.desugar.jdk.libs)
}

val javadocJar: TaskProvider<Jar> by tasks.registering(Jar::class) {
archiveClassifier.set("javadoc")
}

publishing {
publications.withType<MavenPublication> {
artifact(javadocJar)
with(pom) {
name.set(artifactId)
description.set("Low-level API for SQLite on Kotlin Multiplatform")
val githubURL: String by project
url.set(githubURL)
licenses {
license {
val licenseName: String by project
name.set(licenseName)
val licenseURL: String by project
url.set(licenseURL)
}
}
developers {
developer {
val developerID: String by project
id.set(developerID)
val developerName: String by project
name.set(developerName)
val developerEmail: String by project
email.set(developerEmail)
}
}
scm {
url.set(githubURL)
val scmURL: String by project
connection.set(scmURL)
developerConnection.set(scmURL)
mavenPublishing {
publishToMavenCentral()
signAllPublications()

val artifactId = "sqllin-driver"
coordinates(
groupId = GROUP_ID,
artifactId = artifactId,
version = VERSION,
)

pom {
name.set(artifactId)
description.set("Low-level API for SQLite on Kotlin Multiplatform")
val githubURL: String by project
url.set(githubURL)
licenses {
license {
val licenseName: String by project
name.set(licenseName)
val licenseURL: String by project
url.set(licenseURL)
}
}
}
repositories {
maven {
credentials {
val NEXUS_USERNAME: String by project
val NEXUS_PASSWORD: String by project
username = NEXUS_USERNAME
password = NEXUS_PASSWORD
developers {
developer {
val developerID: String by project
id.set(developerID)
val developerName: String by project
name.set(developerName)
val developerEmail: String by project
email.set(developerEmail)
}
val mavenRepositoryURL: String by project
url = uri(mavenRepositoryURL)
}
scm {
url.set(githubURL)
val scmURL: String by project
connection.set(scmURL)
developerConnection.set(scmURL)
}
}
signing {
val SIGNING_KEY_ID: String by project
val SIGNING_KEY: String by project
val SIGNING_PASSWORD: String by project
useInMemoryPgpKeys(SIGNING_KEY_ID, SIGNING_KEY, SIGNING_PASSWORD)
sign(publishing.publications)
}
}

// TODO: remove after https://youtrack.jetbrains.com/issue/KT-46466 is fixed
project.tasks.withType(AbstractPublishToMaven::class.java).configureEach {
dependsOn(project.tasks.withType(Sign::class.java))
}
Loading