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 dependencies #30

Merged
merged 7 commits into from
Oct 24, 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
27 changes: 12 additions & 15 deletions .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v2
uses: gradle/actions/wrapper-validation@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17
java-version: 21
- name: Run tests
run: ./gradlew check
- name: Upload test results
Expand All @@ -42,20 +42,17 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v2
uses: gradle/actions/wrapper-validation@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17
java-version: 21
- name: Install libicu
run: |
wget http://security.ubuntu.com/ubuntu/pool/main/i/icu/libicu66_66.1-2ubuntu2.1_amd64.deb
sudo dpkg -i libicu66_66.1-2ubuntu2.1_amd64.deb
rm libicu66_66.1-2ubuntu2.1_amd64.deb
wget https://launchpad.net/ubuntu/+source/icu/71.1-2/+build/23579523/+files/libicu71_71.1-2_amd64.deb
sudo dpkg -i libicu71_71.1-2_amd64.deb
rm libicu71_71.1-2_amd64.deb
wget https://launchpadlibrarian.net/626467203/libicu71_71.1-3ubuntu1_amd64.deb
sudo dpkg -i libicu71_71.1-3ubuntu1_amd64.deb
rm libicu71_71.1-3ubuntu1_amd64.deb
- name: Run tests
run: ./gradlew check
- name: Upload test results
Expand All @@ -73,12 +70,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v2
uses: gradle/actions/wrapper-validation@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17
java-version: 21
- name: Run tests
run: ./gradlew check
- name: Upload test results
Expand All @@ -96,12 +93,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v2
uses: gradle/actions/wrapper-validation@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17
java-version: 21
- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
Expand All @@ -110,7 +107,7 @@ jobs:
- name: Run connected tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 33
api-level: 35
arch: x86_64
script: ./gradlew connectedCheck
- name: Upload test results
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![Maven Central](https://img.shields.io/maven-central/v/dev.kotbase/couchbase-lite)](
https://central.sonatype.com/namespace/dev.kotbase)
[![Kotlin](https://img.shields.io/badge/kotlin-1.9.23-blue.svg?logo=kotlin)](http://kotlinlang.org)
[![Kotlin](https://img.shields.io/badge/kotlin-1.9.25-blue.svg?logo=kotlin)](http://kotlinlang.org)
[![GitHub License](https://img.shields.io/github/license/jeffdgr8/kotbase)](LICENSE)
[![Couchbase Community](https://img.shields.io/badge/couchbase-community-ea2328?logo=couchbase&logoColor=ea2328)](
https://www.couchbase.com/developers/community/)
Expand Down
7 changes: 4 additions & 3 deletions buildSrc/src/main/kotlin/base-convention.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ kotlin {

targets.configureEach {
compilations.configureEach {
compilerOptions.configure {
freeCompilerArgs.add("-Xexpect-actual-classes")
compileTaskProvider.configure {
compilerOptions.freeCompilerArgs.add("-Xexpect-actual-classes")
}
}
}
Expand Down Expand Up @@ -97,10 +97,11 @@ dependencies {
}

// work around native compiler and linker warnings in tests
// duplicate library name: org.jetbrains.kotlinx:kotlinx-serialization-core
// https://youtrack.jetbrains.com/issue/KT-51110
// (leave off by default, enable to avoid warnings)
/*
configurations.all {
configurations.configureEach {
resolutionStrategy.eachDependency {
if (requested.group == "org.jetbrains.kotlinx" && requested.name == "kotlinx-serialization-core") {
val libs = the<org.gradle.accessors.dm.LibrariesForLibs>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ class DocumentTest : BaseDbTest() {
fun testSetDate() {
var mDoc = MutableDocument("doc1")

val date = Clock.System.now()
val date = Clock.System.nowMillis()
val dateStr = date.toStringMillis()
assertTrue(dateStr.isNotEmpty())
mDoc.setValue("date", date)
Expand Down
3 changes: 2 additions & 1 deletion couchbase-lite/src/commonTest/kotlin/kotbase/JSONTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package kotbase

import kotbase.ext.nowMillis
import kotlinx.datetime.Clock
import kotlin.test.Test
import kotlin.test.assertEquals
Expand All @@ -24,7 +25,7 @@ class JSONTest {
// Verify that round trip String -> Date -> String doesn't alter the string (#1611)
@Test
fun testJSONDateRoundTrip() {
val now = Clock.System.now()
val now = Clock.System.nowMillis()
// internally calls the relevant JSONUtils.toJSONString() and JSONUtils.toDate()
val array = MutableArray()
val dateStr = array.addDate(now).getString(0)
Expand Down
1 change: 1 addition & 0 deletions couchbase-lite/src/commonTest/kotlin/kotbase/QueryTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1965,6 +1965,7 @@ class QueryTest : BaseQueryTest() {
// https://forums.couchbase.com/t/unicode-collation-locale-null-or-device-locale/34103
//assertEquals(expected[i], collations[i].asJSON())
val expectedCollation = expected[i]
@Suppress("UNNECESSARY_SAFE_CALL", "KotlinRedundantDiagnosticSuppress")
val collation = collations[i].asJSON()?.massageJson(expectedCollation)
assertEquals(expectedCollation, collation)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ public actual class ReplicatedDocument
internal constructor(actual: CBLReplicatedDocument) : DelegatedClass<CBLReplicatedDocument>(actual) {

public actual val scope: String
get() = actual.collectionScope
get() = actual.scope

public actual val collection: String
get() = actual.collectionName
get() = actual.collection

public actual val id: String
get() = actual.id
Expand Down
30 changes: 15 additions & 15 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,36 @@ couchbase-lite-java = "3.1.9"
couchbase-lite-objc = "3.1.9"
couchbase-lite-c = "3.1.9"
dokka = "1.9.20"
kotlinx-serialization = "1.6.3"
mockk = "1.13.10"
kotlinx-serialization = "1.7.3"
mockk = "1.13.13"

[plugins]
android-library = { id = "com.android.library", version = "8.2.2" }
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version = "1.9.23" }
kotlinx-binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version = "0.15.0-Beta.1" }
vanniktech-maven-publish = { id = "com.vanniktech.maven.publish", version = "0.27.0" }
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version = "1.9.25" }
kotlinx-binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version = "0.16.3" }
vanniktech-maven-publish = { id = "com.vanniktech.maven.publish", version = "0.30.0" }

[libraries]
androidx-lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version = "2.7.0" }
androidx-startup = { module = "androidx.startup:startup-runtime", version = "1.1.1" }
androidx-test-core-ktx = { module = "androidx.test:core-ktx", version = "1.5.0" }
androidx-test-runner = { module = "androidx.test:runner", version = "1.5.2" }
androidx-lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version = "2.8.6" }
androidx-startup = { module = "androidx.startup:startup-runtime", version = "1.2.0" }
androidx-test-core-ktx = { module = "androidx.test:core-ktx", version = "1.6.1" }
androidx-test-runner = { module = "androidx.test:runner", version = "1.6.2" }
couchbase-lite-android = { module = "com.couchbase.lite:couchbase-lite-android", version.ref = "couchbase-lite-java" }
couchbase-lite-android-ee = { module = "com.couchbase.lite:couchbase-lite-android-ee", version.ref = "couchbase-lite-java" }
couchbase-lite-java = { module = "com.couchbase.lite:couchbase-lite-java", version.ref = "couchbase-lite-java" }
couchbase-lite-java-ee = { module = "com.couchbase.lite:couchbase-lite-java-ee", version.ref = "couchbase-lite-java" }
dokka-versioning = { module = "org.jetbrains.dokka:versioning-plugin", version.ref = "dokka" }
kermit = { module = "co.touchlab:kermit", version = "2.0.3" }
kermit = { module = "co.touchlab:kermit", version = "2.0.4" }
korlibs-korio = { module = "com.soywiz.korlibs.korio:korio", version = "4.0.10" }
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test" }
kotlin-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit" }
kotlinx-atomicfu = { module = "org.jetbrains.kotlinx:atomicfu", version = "0.23.2" }
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version = "1.8.0" }
kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version = "0.5.0" }
kotlinx-io = { module = "org.jetbrains.kotlinx:kotlinx-io-core", version = "0.3.2" }
kotlinx-atomicfu = { module = "org.jetbrains.kotlinx:atomicfu", version = "0.26.0" }
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version = "1.9.0" }
kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version = "0.6.1" }
kotlinx-io = { module = "org.jetbrains.kotlinx:kotlinx-io-core", version = "0.5.4" }
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinx-serialization" }
mockk = { module = "io.mockk:mockk", version.ref = "mockk" }
mockk-android = { module = "io.mockk:mockk-android", version.ref = "mockk" }
paging = { module = "app.cash.paging:paging-common", version = "3.3.0-alpha02-0.5.1" }
stately = { module = "co.touchlab:stately-concurrent-collections", version = "2.0.6" }
stately = { module = "co.touchlab:stately-concurrent-collections", version = "2.1.0" }
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
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 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
22 changes: 13 additions & 9 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down Expand Up @@ -83,7 +85,9 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -144,15 +148,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -201,11 +205,11 @@ fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
22 changes: 12 additions & 10 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down Expand Up @@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand All @@ -57,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand Down