-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
4.0.0: New Dependencies and modules management
- Loading branch information
Showing
44 changed files
with
159 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
/.gradle/ | ||
/.idea/ | ||
|
||
/build/ | ||
/data/ | ||
/buildSrc/build/ | ||
/core/build/ | ||
/files/build/ | ||
/local-storage/build/ | ||
|
||
/.gradle/ | ||
/buildSrc/.gradle/ | ||
|
||
/data/ | ||
|
||
/local.properties | ||
/jsCommon/build/ | ||
/utils/build/ | ||
/.idea/ | ||
/deploy.properties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,98 +1,13 @@ | ||
@file:Suppress("UNUSED_VARIABLE") | ||
|
||
plugins { | ||
kotlin(plugin.multiplatform) | ||
kotlin(plugin.serialization) version Version.SERIALIZATION_PLUGIN | ||
} | ||
|
||
group = AppInfo.PACKAGE | ||
version = AppInfo.VERSION | ||
|
||
repositories { | ||
mavenCentral() | ||
// Required for nodejs bindings. Waiting for deploy to mavenCentral() | ||
@kotlin.Suppress("DEPRECATION") jcenter() | ||
} | ||
|
||
kotlin { | ||
val jsType = Attribute.of("jsType", String::class.java) | ||
js(IR) { | ||
attributes.attribute(jsType, "browser") | ||
browser() | ||
} | ||
js("node", IR) { | ||
attributes.attribute(jsType, "node") | ||
useCommonJs() | ||
nodejs() | ||
} | ||
jvm() | ||
|
||
// native targets are not implemented; if you need it, create an issue | ||
|
||
sourceSets { | ||
val commonMain by getting { | ||
dependencies { | ||
implementation(coroutines) | ||
api(serialization) | ||
} | ||
} | ||
|
||
val commonTest by getting { | ||
dependencies { | ||
implementation(kotlin("test-common")) | ||
implementation(kotlin("test-annotations-common")) | ||
} | ||
} | ||
|
||
val filesTarget by creating { | ||
dependsOn(commonMain) | ||
} | ||
|
||
val jvmMain by getting { | ||
dependsOn(filesTarget) | ||
} | ||
val jvmTest by getting { | ||
dependencies { | ||
implementation(kotlin("test-junit")) | ||
} | ||
} | ||
|
||
val commonJsMain by creating { | ||
dependsOn(commonMain) | ||
} | ||
|
||
val nodeMain by getting { | ||
dependsOn(filesTarget) | ||
dependsOn(commonJsMain) | ||
|
||
dependencies { | ||
implementation(nodejsExternals) | ||
} | ||
} | ||
val nodeTest by getting { | ||
dependencies { | ||
implementation(kotlin("test-js")) | ||
} | ||
} | ||
|
||
val jsMain by getting { | ||
dependsOn(commonJsMain) | ||
} | ||
val jsTest by getting { | ||
dependencies { | ||
implementation(kotlin("test-js")) | ||
} | ||
} | ||
|
||
all { | ||
languageSettings.useExperimentalAnnotation("kotlin.RequiresOptIn") | ||
} | ||
allprojects { | ||
repositories { | ||
mavenCentral() | ||
// Required for nodejs bindings. Waiting for deploy to mavenCentral() | ||
@kotlin.Suppress("DEPRECATION") jcenter() | ||
} | ||
} | ||
|
||
val root = project | ||
allprojects { | ||
subprojects { | ||
group = AppInfo.PACKAGE | ||
version = AppInfo.VERSION | ||
applyDeploy() | ||
group = root.group | ||
version = root.version | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
object AppInfo { | ||
const val PACKAGE = "fun.kotlingang.kds" | ||
const val VERSION = "3.0.4" | ||
const val VERSION = "4.0.0" | ||
const val NAME = "Kotlin Data Storage" | ||
const val DESCRIPTION = "Multiplatform Coroutine-Based Kotlin Library for storing data via kotlinx.serialization" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,8 @@ | ||
import org.gradle.api.artifacts.dsl.DependencyHandler | ||
import org.gradle.kotlin.dsl.project | ||
import org.jetbrains.kotlin.gradle.plugin.KotlinDependencyHandler | ||
|
||
|
||
val KotlinDependencyHandler.core get() = project(":core") | ||
|
||
val DependencyHandler.core get() = project(":core") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Core | ||
This module is used to split KDS implementations from core, so you can define your own one without implementation of other realizations | ||
|
||
**Dependency**: `fun.kotlingang.kds:core:$version` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
@file:Suppress("UNUSED_VARIABLE") | ||
|
||
plugins { | ||
kotlin(plugin.multiplatform) | ||
} | ||
|
||
kotlin { | ||
jvm() | ||
js(BOTH) { | ||
browser() | ||
nodejs() | ||
useCommonJs() | ||
} | ||
|
||
sourceSets { | ||
val commonMain by getting { | ||
dependencies { | ||
implementation(coroutines) | ||
implementation(serialization) | ||
} | ||
} | ||
|
||
all { | ||
languageSettings.useExperimentalAnnotation("kotlin.RequiresOptIn") | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions
1
...n/fun/kotlingang/kds/sync/synchronized.kt → ...tlingang/kds/sync/platformSynchronized.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
package `fun`.kotlingang.kds.sync | ||
|
||
|
||
@PublishedApi | ||
internal actual inline fun <R> platformSynchronized(lock: Any, block: () -> R) = block() |
3 changes: 2 additions & 1 deletion
3
...n/fun/kotlingang/kds/sync/synchronized.kt → ...tlingang/kds/sync/platformSynchronized.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
package `fun`.kotlingang.kds.sync | ||
|
||
|
||
internal actual inline fun <R> platformSynchronized(lock: Any, block: () -> R) = synchronized(lock) { block() } | ||
@PublishedApi | ||
internal actual inline fun <R> platformSynchronized(lock: Any, block: () -> R) = synchronized(lock, block) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Files | ||
`KFileDataStorage` is `KAsyncDataStorage` implementation with files. | ||
|
||
**Platforms**: JVM, NodeJS <br> | ||
**Dependency**: `fun.kotlingang.kds:files:$version` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
@file:Suppress("UNUSED_VARIABLE") | ||
|
||
plugins { | ||
kotlin(plugin.multiplatform) | ||
} | ||
|
||
kotlin { | ||
jvm() | ||
js(BOTH) { | ||
nodejs() | ||
useCommonJs() | ||
} | ||
|
||
sourceSets { | ||
val commonMain by getting { | ||
dependencies { | ||
api(core) | ||
implementation(coroutines) | ||
implementation(serialization) | ||
} | ||
} | ||
val jsMain by getting { | ||
dependencies { | ||
implementation(nodejsExternals) | ||
} | ||
} | ||
val jvmTest by getting { | ||
dependencies { | ||
implementation(kotlin("test-junit")) | ||
} | ||
} | ||
|
||
all { | ||
languageSettings.useExperimentalAnnotation("kotlin.RequiresOptIn") | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Local Storage | ||
`KLocalDataStorage` is `KBlockingDataStorage` implementation with browser `localStorage` | ||
|
||
**Platforms**: Browser JS <br> | ||
**Dependency**: `fun.kotlingang.kds:local-storage:$version` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
plugins { | ||
kotlin(plugin.js) | ||
} | ||
|
||
kotlin { | ||
js(BOTH) { | ||
browser() | ||
useCommonJs() | ||
} | ||
} | ||
|
||
dependencies { | ||
api(core) | ||
implementation(serialization) | ||
} |
1 change: 0 additions & 1 deletion
1
...n/fun/kotlingang/kds/KLocalDataStorage.kt → ...n/fun/kotlingang/kds/KLocalDataStorage.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
rootProject.name = "kds" | ||
|
||
include("core") | ||
include("files") | ||
include("local-storage") |
8 changes: 0 additions & 8 deletions
8
src/commonJsMain/kotlin/fun/kotlingang/kds/test/launchTest.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.