now poject is multiplatform
This commit is contained in:
parent
6c50bb0e97
commit
dfc2824d7a
@ -1,4 +1,4 @@
|
||||
project.group = "com.insanusmokrassar"
|
||||
project.group = "$project_public_group"
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
|
@ -15,9 +15,8 @@ buildscript {
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'java-library'
|
||||
apply plugin: 'kotlin'
|
||||
apply plugin: 'kotlinx-serialization'
|
||||
apply plugin: 'kotlin-multiplatform'
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
@ -26,15 +25,24 @@ repositories {
|
||||
maven { url "https://kotlin.bintray.com/kotlinx" }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
api "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlin_coroutines_version"
|
||||
api "org.jetbrains.kotlinx:kotlinx-serialization-runtime:$kotlin_serialisation_runtime_version"
|
||||
api "joda-time:joda-time:$joda_time_version"
|
||||
}
|
||||
kotlin {
|
||||
jvm("jvm8")
|
||||
|
||||
compileKotlin {
|
||||
kotlinOptions {
|
||||
freeCompilerArgs = [ disableImplicitReflectionSerializerAnnotation ]
|
||||
sourceSets {
|
||||
commonMain {
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
api "org.jetbrains.kotlinx:kotlinx-coroutines-core-common:$kotlin_coroutines_version"
|
||||
api "org.jetbrains.kotlinx:kotlinx-serialization-runtime-common:$kotlin_serialisation_runtime_version"
|
||||
|
||||
api "com.soywiz.korlibs.klock:klock:$klockVersion"
|
||||
}
|
||||
}
|
||||
jvm8Main {
|
||||
dependencies {
|
||||
api "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlin_coroutines_version"
|
||||
api "org.jetbrains.kotlinx:kotlinx-serialization-runtime:$kotlin_serialisation_runtime_version"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.insanusmokrassar.postssystem.core.post
|
||||
|
||||
import com.insanusmokrassar.postssystem.core.content.ContentId
|
||||
import org.joda.time.DateTime
|
||||
import com.soywiz.klock.DateTime
|
||||
|
||||
typealias PostId = String
|
||||
typealias ContentIds = List<ContentId>
|
@ -7,7 +7,7 @@ import com.insanusmokrassar.postssystem.core.utils.MAX_DATE
|
||||
import com.insanusmokrassar.postssystem.core.utils.MIN_DATE
|
||||
import com.insanusmokrassar.postssystem.core.utils.pagination.Pagination
|
||||
import com.insanusmokrassar.postssystem.core.utils.pagination.PaginationResult
|
||||
import org.joda.time.DateTime
|
||||
import com.soywiz.klock.DateTime
|
||||
|
||||
/**
|
||||
* Simple read API by different properties
|
@ -1,6 +1,6 @@
|
||||
package com.insanusmokrassar.postssystem.core.utils
|
||||
|
||||
import org.joda.time.DateTime
|
||||
import com.soywiz.klock.DateTime
|
||||
|
||||
internal val MIN_DATE = DateTime(0)
|
||||
internal val MAX_DATE = DateTime(Long.MAX_VALUE)
|
@ -2,9 +2,8 @@ package com.insanusmokrassar.postssystem.core.utils
|
||||
|
||||
import com.insanusmokrassar.postssystem.core.content.ContentId
|
||||
import com.insanusmokrassar.postssystem.core.post.PostId
|
||||
import java.util.*
|
||||
|
||||
private fun generateId() = UUID.randomUUID().toString()
|
||||
internal expect fun generateId(): String
|
||||
|
||||
internal fun generatePostId(): PostId = generateId()
|
||||
internal fun generateContentId(): ContentId = generateId()
|
@ -0,0 +1,5 @@
|
||||
package com.insanusmokrassar.postssystem.core.utils
|
||||
|
||||
import java.util.*
|
||||
|
||||
internal actual fun generateId(): String = UUID.randomUUID().toString()
|
@ -3,7 +3,7 @@ kotlin_version=1.3.50
|
||||
kotlin_coroutines_version=1.3.1
|
||||
kotlin_serialisation_runtime_version=0.13.0
|
||||
|
||||
joda_time_version=2.10.3
|
||||
klockVersion=1.7.3
|
||||
|
||||
gradle_bintray_plugin_version=1.8.4
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user