From 59891f62bb17a3115304ef5d39df8feea74bd872 Mon Sep 17 00:00:00 2001 From: Shreck Ye Date: Thu, 14 Jul 2022 14:11:57 +0800 Subject: [PATCH] Add "kotlinx-datetime" to "common-gradle-dependencies" --- common-gradle-dependencies/build.gradle.kts | 2 +- .../src/main/kotlin/com/huanshankeji/CommonDependencies.kt | 3 +++ .../src/main/kotlin/com/huanshankeji/CommonVersions.kt | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/common-gradle-dependencies/build.gradle.kts b/common-gradle-dependencies/build.gradle.kts index e0f37d2..2a3557e 100644 --- a/common-gradle-dependencies/build.gradle.kts +++ b/common-gradle-dependencies/build.gradle.kts @@ -4,4 +4,4 @@ plugins { // "x.y.z" indicates the version of the way of organizing the code, // and the date indicates the version when the dependency versions are updated. -version = "0.2.0-20220527-kotlin-1.6.10-SNAPSHOT" +version = "0.2.0-20220714-kotlin-1.6.10-SNAPSHOT" diff --git a/common-gradle-dependencies/src/main/kotlin/com/huanshankeji/CommonDependencies.kt b/common-gradle-dependencies/src/main/kotlin/com/huanshankeji/CommonDependencies.kt index 2fed98d..d15a962 100644 --- a/common-gradle-dependencies/src/main/kotlin/com/huanshankeji/CommonDependencies.kt +++ b/common-gradle-dependencies/src/main/kotlin/com/huanshankeji/CommonDependencies.kt @@ -62,6 +62,9 @@ class CommonDependencies(val versions: CommonVersions = CommonVersions()) { } val serialization = Serialization() + + fun datetime(version: String = versions.kotlinxDatetime) = + kotlinx("datetime", version) } val kotlinx = Kotlinx() diff --git a/common-gradle-dependencies/src/main/kotlin/com/huanshankeji/CommonVersions.kt b/common-gradle-dependencies/src/main/kotlin/com/huanshankeji/CommonVersions.kt index 3ca3a1b..c6edcd6 100644 --- a/common-gradle-dependencies/src/main/kotlin/com/huanshankeji/CommonVersions.kt +++ b/common-gradle-dependencies/src/main/kotlin/com/huanshankeji/CommonVersions.kt @@ -9,6 +9,7 @@ class CommonVersions( val kotlinxCoroutines: String = "1.6.1", val kotlinxHtml: String = "0.7.5", val kotlinxSerialization: String = "1.3.2", + val kotlinxDatetime: String = "0.4.0", val ktor: String = "1.6.8", val arrow: String = "1.0.1",