Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to K2 #100

Merged
merged 3 commits into from
Dec 4, 2024
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
32 changes: 13 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ jobs:
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v3

- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
java-version: 21

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4

- name: Cache Build Tooling
uses: actions/cache@v4
Expand Down Expand Up @@ -63,9 +63,6 @@ jobs:
- name: Run sqllin-dsl JVM Unit Tests on macOS X64
run: ./test_dsl_jvm.sh

- name: Gradle Cache
uses: gradle/actions/setup-gradle@v3

- name: AVD Cache
uses: actions/cache@v4
id: avd-cache
Expand All @@ -83,7 +80,7 @@ jobs:
target: google_apis
arch: x86_64
profile: pixel_6
emulator-build: 11698152
emulator-build: 12265550
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
Expand All @@ -96,7 +93,7 @@ jobs:
target: google_apis
arch: x86_64
profile: pixel_6
emulator-build: 11698152
emulator-build: 12265550
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 @@ -127,14 +124,14 @@ jobs:
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v3

- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
java-version: 21

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4

- name: Cache Build Tooling
uses: actions/cache@v4
Expand Down Expand Up @@ -187,14 +184,14 @@ jobs:
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v3

- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
java-version: 21

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4

- name: Cache Build Tooling
uses: actions/cache@v4
Expand Down Expand Up @@ -225,9 +222,6 @@ jobs:
- name: Run sqllin-dsl JVM Unit Tests on Linux X64
run: ./test_dsl_jvm.sh

- name: Gradle Cache
uses: gradle/actions/setup-gradle@v3

- name: AVD Cache
uses: actions/cache@v4
id: avd-cache
Expand All @@ -245,7 +239,7 @@ jobs:
target: default
arch: x86_64
profile: pixel_2
emulator-build: 11698152
emulator-build: 12265550
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
Expand All @@ -258,7 +252,7 @@ jobs:
target: default
arch: x86_64
profile: pixel_2
emulator-build: 11698152
emulator-build: 12265550
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
24 changes: 9 additions & 15 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ jobs:
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v3

- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
java-version: 21

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4

- name: Cache Build Tooling
uses: actions/cache@v4
Expand All @@ -46,9 +46,6 @@ jobs:
- name: Build sqllin-dsl
run: ./gradlew :sqllin-dsl:assemble -PonCICD

- name: Gradle Cache
uses: gradle/actions/setup-gradle@v3

- name: Publish to MavenCentral
run: ./publish_apple_android_jvm.sh

Expand All @@ -63,14 +60,14 @@ jobs:
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v3

- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
java-version: 21

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4

- name: Cache Build Tooling
uses: actions/cache@v4
Expand Down Expand Up @@ -100,14 +97,14 @@ jobs:
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v3

- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
java-version: 21

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4

- name: Cache Build Tooling
uses: actions/cache@v4
Expand All @@ -126,8 +123,5 @@ jobs:
- name: Build sqllin-dsl
run: ./gradlew :sqllin-dsl:assemble -PonCICD

- name: Gradle Cache
uses: gradle/actions/setup-gradle@v3

- name: Publish to MavenCentral
run: ./publish_linux_processor.sh
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ local.properties
/sqllin-dsl/build
/sqllin-processor/build
/sample/build
*.podspec
*.podspec
.kotlin
16 changes: 12 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,24 @@

- Date format: YYYY-MM-dd

## vx.x.x / 2024-xx-xx
## v1.4.0 / 2024-12-04

### All

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

### sqllin-dsl

* Update `kotlinx.coroutines`'s version to `1.8.1`
<!--* Update `kotlinx.serialization`'s version to `1.7.1`-->
* Update `kotlinx.coroutines`'s version to `1.9.0`
* Update `kotlinx.serialization`'s version to `1.7.3`

### sqllin-driver

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

### sqllin-processor

* Update `KSP`'s version to `2.1.0-1.0.29`

## v1.3.2 / 2024-06-18

Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION=1.3.2
VERSION=1.4.0
GROUP=com.ctrip.kotlin

#Maven Publish Information
Expand Down Expand Up @@ -27,4 +27,5 @@ kotlin.code.style=official
kotlin.mpp.stability.nowarn=true
kotlin.mpp.enableCInteropCommonization=true
kotlin.natvie.increment=true
#ksp.useKSP2=true
#kotlin.compiler.execution.strategy=out-of-process
19 changes: 9 additions & 10 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
[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"
kotlin = "2.1.0"
agp = "8.7.3"
ksp = "2.1.0-1.0.29"
serialization = "1.7.3"
coroutines = "1.9.0"
androidx-annotation = "1.9.1"
androidx-test = "1.6.1"
sqlite-jdbc = "3.46.0.0"
androidx-test-runner = "1.6.2"
sqlite-jdbc = "3.47.1.0"

[libraries]

Expand All @@ -18,13 +19,11 @@ kotlinx-coroutines = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutin

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-runner = { group = "androidx.test", name = "runner", version.ref = "androidx-test-runner" }
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" }
Expand Down
27 changes: 12 additions & 15 deletions sample/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import org.jetbrains.kotlin.gradle.dsl.KotlinCompile
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask

plugins {
alias(libs.plugins.kotlin.multiplatform)
Expand All @@ -14,21 +15,21 @@ kotlin {
publishLibraryVariants("release")
}
jvm {
compilations.all {
kotlinOptions {
jvmTarget = "11"
}
}
compilerOptions.jvmTarget.set(JvmTarget.JVM_11)
}
iosX64()
iosArm64()
iosSimulatorArm64()

compilerOptions {
freeCompilerArgs.add("-Xexpect-actual-classes")
}

sourceSets {
all {
languageSettings.optIn("kotlin.RequiresOptIn")
}
val commonMain by getting {
commonMain {
kotlin.srcDir("build/generated/ksp/metadata/commonMain/kotlin")
dependencies {
implementation(project(":sqllin-dsl"))
Expand All @@ -41,29 +42,25 @@ kotlin {

android {
namespace = "com.ctrip.sqllin.sample"
compileSdk = 34
compileSdk = 35
defaultConfig {
minSdk = 23
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_21
}
}

dependencies {
add("kspCommonMainMetadata", project(":sqllin-processor"))
}

afterEvaluate { // WORKAROUND: both register() and named() fail – https://github.com/gradle/gradle/issues/9331
afterEvaluate { // WORKAROUND: both register() and named() fail – https://github.com/gradle/gradle/issues/9331
tasks {
withType<KotlinCompile<*>> {
withType<KotlinCompilationTask<*>> {
if (name != "kspCommonMainKotlinMetadata")
dependsOn("kspCommonMainKotlinMetadata")
}
}
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
compilerOptions.freeCompilerArgs.add("-Xexpect-actual-classes")
}
Loading
Loading