impl common

This commit is contained in:
000Sanya 2020-08-13 16:47:40 +10:00
parent 46c84099be
commit 6809a1cc4b
7 changed files with 99 additions and 0 deletions

View File

@ -0,0 +1,78 @@
buildscript {
repositories {
mavenLocal()
jcenter()
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:$gradle_bintray_plugin_version"
}
}
plugins {
id "org.jetbrains.kotlin.multiplatform" version "$kotlin_version"
id "org.jetbrains.kotlin.plugin.serialization" version "$kotlin_version"
}
project.version = "$core_version"
project.group = "com.insanusmokrassar"
apply from: "publish.gradle"
repositories {
mavenLocal()
jcenter()
mavenCentral()
maven { url "https://kotlin.bintray.com/kotlinx" }
}
kotlin {
jvm()
js()
sourceSets {
commonMain {
dependencies {
implementation kotlin('stdlib')
if ((project.hasProperty('RELEASE_MODE') && project.property('RELEASE_MODE') == "true") || System.getenv('RELEASE_MODE') == "true") {
api "com.insanusmokrassar:postssystem.ktor.common:$core_version"
api "com.insanusmokrassar:postssystem.core.api:$core_version"
} else {
api projectByName("postssystem.ktor.common")
api projectByName("postssystem.core.api")
}
}
}
commonTest {
dependencies {
implementation kotlin('test-common')
implementation kotlin('test-annotations-common')
}
}
jvmMain {
dependencies {
implementation kotlin('stdlib-jdk8')
}
}
jvmTest {
dependencies {
implementation kotlin('test-junit')
}
}
jsMain {
dependencies {
implementation kotlin('stdlib-js')
}
}
jsTest {
dependencies {
implementation kotlin('test-js')
implementation kotlin('test-junit')
}
}
}
}

View File

View File

@ -0,0 +1,7 @@
package com.insanusmokrassar.postssystem.publishing.ktor
const val getPostIdByTriggerControlKeyRoute = "getPostIdByTriggerControlKey"
const val getTriggerControlKeyByPostIdRoute = "getTriggerControlKeyByPostId"
const val setPostTriggerControlKeyRoute = "setPostTriggerControlKey"
const val unsetPostTriggerControlKeyRoute = "unsetPostTriggerControlKey"

View File

@ -0,0 +1,4 @@
package com.insanusmokrassar.postssystem.publishing.ktor
//const val getPostIdByTriggerControlKeyRoute = "getPostIdByTriggerControlKey"
const val registerTriggerForPostRoute = "registerTriggerForPost"

View File

@ -0,0 +1,3 @@
package com.insanusmokrassar.postssystem.publishing.ktor
const val triggerPostingRoute = "triggerPosting"

View File

@ -0,0 +1,6 @@
package com.insanusmokrassar.postssystem.publishing.ktor
import com.insanusmokrassar.postssystem.ktor.setIdsSerializer
val postsIdSerializer = setIdsSerializer
val triggerControlKeysSerializer = setIdsSerializer

View File

@ -22,6 +22,7 @@ String[] includes = [
':publishing:api',
':publishing:exposed',
':publishing:ktor:common',
':markups:commons',
':markups:html'