temporal push for keeping history
This commit is contained in:
parent
8686e60fbc
commit
93f70fe874
76
core/api/build.gradle
Normal file
76
core/api/build.gradle
Normal file
@ -0,0 +1,76 @@
|
||||
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" }
|
||||
}
|
||||
|
||||
project.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.utils.repos:$core_version"
|
||||
} else {
|
||||
api project(":utils:repos")
|
||||
}
|
||||
}
|
||||
}
|
||||
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')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -34,11 +34,11 @@ dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
|
||||
if ((project.hasProperty('RELEASE_MODE') && project.property('RELEASE_MODE') == "true") || System.getenv('RELEASE_MODE') == "true") {
|
||||
api "com.insanusmokrassar:postssystem.core:$core_version"
|
||||
api "com.insanusmokrassar:postssystem.core.api:$core_version"
|
||||
api "com.insanusmokrassar:postssystem.exposed.commons:$core_version"
|
||||
} else {
|
||||
api project(":postssystem.core")
|
||||
api project(":postssystem.exposed.commons")
|
||||
api project(":core:api")
|
||||
api project(":exposed:commons")
|
||||
}
|
||||
|
||||
testImplementation "org.xerial:sqlite-jdbc:$test_sqlite_version"
|
78
core/ktor/client/build.gradle
Normal file
78
core/ktor/client/build.gradle
Normal 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.core.ktor.common:$core_version"
|
||||
api "com.insanusmokrassar:postssystem.ktor.client:$core_version"
|
||||
} else {
|
||||
api project(":core:ktor:common")
|
||||
api project(":ktor:client")
|
||||
}
|
||||
}
|
||||
}
|
||||
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')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
1
core/ktor/client/gradle.properties
Normal file
1
core/ktor/client/gradle.properties
Normal file
@ -0,0 +1 @@
|
||||
|
0
core/ktor/client/publish.gradle
Normal file
0
core/ktor/client/publish.gradle
Normal file
1
core/ktor/client/publish_config.json
Normal file
1
core/ktor/client/publish_config.json
Normal file
@ -0,0 +1 @@
|
||||
{"bintrayConfig":{"repo":"InsanusMokrassar","packageName":"${project.name}","packageVcs":"https://github.com/PostsSystem/PostsSystemCore"},"licenses":[{"id":"Apache-2.0","title":"Apache Software License 2.0","url":"https://git.insanusmokrassar.com/PostsSystem/Core/src/master/LICENSE"}],"mavenConfig":{"name":"PostsSystem Core Exposed realization","description":"Exposed realisation for PostsSystem Core","url":"https://git.insanusmokrassar.com/PostsSystem/Core/","vcsUrl":"https://git.insanusmokrassar.com/PostsSystem/Core/.git","developers":[{"id":"InsanusMokrassar","name":"Ovsiannikov Aleksei","eMail":"ovsyannikov.alexey95@gmail.com"}]},"type":"JVM"}
|
1
core/ktor/client/settings.gradle
Normal file
1
core/ktor/client/settings.gradle
Normal file
@ -0,0 +1 @@
|
||||
|
@ -0,0 +1,32 @@
|
||||
package com.insanusmokrassar.postssystem.core.ktor.client.content
|
||||
|
||||
//import com.insanusmokrassar.postssystem.core.content.ContentId
|
||||
//import com.insanusmokrassar.postssystem.core.content.RegisteredContent
|
||||
//import com.insanusmokrassar.postssystem.core.content.api.ReadContentRepo
|
||||
//import com.insanusmokrassar.postssystem.core.ktor.getContentByIdRoute
|
||||
//import com.insanusmokrassar.postssystem.core.ktor.getContentsIdsRoute
|
||||
//import com.insanusmokrassar.postssystem.utils.repos.pagination.Pagination
|
||||
//import com.insanusmokrassar.postssystem.utils.repos.pagination.PaginationResult
|
||||
//import io.ktor.client.HttpClient
|
||||
//import io.ktor.client.request.get
|
||||
//import io.ktor.client.statement.HttpResponse
|
||||
//import kotlinx.io.InputStream
|
||||
//
|
||||
//class ReadContentRepoKtorClient(
|
||||
// private val client: HttpClient,
|
||||
// private val baseUrl: String
|
||||
//) : ReadContentRepo {
|
||||
// override suspend fun getContentsIds(): Set<ContentId> = client.get<HttpResponse>(
|
||||
// "$baseUrl/$getContentsIdsRoute"
|
||||
// ).content.let {
|
||||
// TODO()
|
||||
// }
|
||||
//
|
||||
// override suspend fun getContentById(id: ContentId): RegisteredContent? {
|
||||
// TODO("Not yet implemented")
|
||||
// }
|
||||
//
|
||||
// override suspend fun getContentByPagination(pagination: Pagination): PaginationResult<out RegisteredContent> {
|
||||
// TODO("Not yet implemented")
|
||||
// }
|
||||
//}
|
78
core/ktor/common/build.gradle
Normal file
78
core/ktor/common/build.gradle
Normal 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 project(":ktor:common")
|
||||
api project(":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')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
1
core/ktor/common/gradle.properties
Normal file
1
core/ktor/common/gradle.properties
Normal file
@ -0,0 +1 @@
|
||||
|
0
core/ktor/common/publish.gradle
Normal file
0
core/ktor/common/publish.gradle
Normal file
1
core/ktor/common/publish_config.json
Normal file
1
core/ktor/common/publish_config.json
Normal file
@ -0,0 +1 @@
|
||||
{"bintrayConfig":{"repo":"InsanusMokrassar","packageName":"${project.name}","packageVcs":"https://github.com/PostsSystem/PostsSystemCore"},"licenses":[{"id":"Apache-2.0","title":"Apache Software License 2.0","url":"https://git.insanusmokrassar.com/PostsSystem/Core/src/master/LICENSE"}],"mavenConfig":{"name":"PostsSystem Core Exposed realization","description":"Exposed realisation for PostsSystem Core","url":"https://git.insanusmokrassar.com/PostsSystem/Core/","vcsUrl":"https://git.insanusmokrassar.com/PostsSystem/Core/.git","developers":[{"id":"InsanusMokrassar","name":"Ovsiannikov Aleksei","eMail":"ovsyannikov.alexey95@gmail.com"}]},"type":"JVM"}
|
@ -0,0 +1,5 @@
|
||||
package com.insanusmokrassar.postssystem.core.ktor
|
||||
|
||||
const val getContentsIdsRoute = "getContentsIds"
|
||||
const val getContentByIdRoute = "getContentById"
|
||||
const val getContentByPaginationRoute = "getContentByPagination"
|
@ -31,17 +31,15 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
api "org.jetbrains.exposed:exposed-core:$exposed_version"
|
||||
api "org.jetbrains.exposed:exposed-jdbc:$exposed_version"
|
||||
|
||||
if ((project.hasProperty('RELEASE_MODE') && project.property('RELEASE_MODE') == "true") || System.getenv('RELEASE_MODE') == "true") {
|
||||
api "com.insanusmokrassar:postssystem.core:$core_version"
|
||||
api "com.insanusmokrassar:postssystem.utils.repos:$core_version"
|
||||
} else {
|
||||
api project(":postssystem.core")
|
||||
api project(":utils:repos")
|
||||
}
|
||||
|
||||
testImplementation "org.xerial:sqlite-jdbc:$test_sqlite_version"
|
||||
testImplementation "org.jetbrains.kotlin:kotlin-test"
|
||||
testImplementation "org.jetbrains.kotlin:kotlin-test-junit"
|
||||
}
|
@ -1,8 +1,10 @@
|
||||
kotlin.code.style=official
|
||||
kotlin_version=1.3.72
|
||||
kotlin_coroutines_version=1.3.7
|
||||
kotlin_coroutines_version=1.3.8
|
||||
kotlin_serialisation_runtime_version=0.20.0
|
||||
|
||||
ktor_version=1.3.2
|
||||
|
||||
klockVersion=1.11.12
|
||||
uuidVersion=0.1.0
|
||||
|
||||
|
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,4 @@
|
||||
#Wed JAN 29 22:07:00 OMST 2020
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5.1-bin.zip
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
|
82
ktor/client/build.gradle
Normal file
82
ktor/client/build.gradle
Normal file
@ -0,0 +1,82 @@
|
||||
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"
|
||||
} else {
|
||||
api project(":ktor:common")
|
||||
}
|
||||
|
||||
api "io.ktor:ktor-client-core:$ktor_version"
|
||||
}
|
||||
}
|
||||
commonTest {
|
||||
dependencies {
|
||||
implementation kotlin('test-common')
|
||||
implementation kotlin('test-annotations-common')
|
||||
}
|
||||
}
|
||||
jvmMain {
|
||||
dependencies {
|
||||
implementation kotlin('stdlib-jdk8')
|
||||
|
||||
api "io.ktor:ktor-client:$ktor_version"
|
||||
}
|
||||
}
|
||||
jvmTest {
|
||||
dependencies {
|
||||
implementation kotlin('test-junit')
|
||||
}
|
||||
}
|
||||
jsMain {
|
||||
dependencies {
|
||||
implementation kotlin('stdlib-js')
|
||||
|
||||
api "io.ktor:ktor-client-js:$ktor_version"
|
||||
}
|
||||
}
|
||||
jsTest {
|
||||
dependencies {
|
||||
implementation kotlin('test-js')
|
||||
implementation kotlin('test-junit')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -37,17 +37,8 @@ kotlin {
|
||||
commonMain {
|
||||
dependencies {
|
||||
implementation kotlin('stdlib')
|
||||
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"
|
||||
api "com.benasher44:uuid:$uuidVersion"
|
||||
|
||||
if ((project.hasProperty('RELEASE_MODE') && project.property('RELEASE_MODE') == "true") || System.getenv('RELEASE_MODE') == "true") {
|
||||
api "com.insanusmokrassar:postssystem.utils.repos:$core_version"
|
||||
} else {
|
||||
api project(":postssystem.utils.repos")
|
||||
}
|
||||
api "org.jetbrains.kotlinx:kotlinx-serialization-cbor-common:$kotlin_serialisation_runtime_version"
|
||||
}
|
||||
}
|
||||
commonTest {
|
||||
@ -59,8 +50,8 @@ kotlin {
|
||||
jvmMain {
|
||||
dependencies {
|
||||
implementation kotlin('stdlib-jdk8')
|
||||
api "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlin_coroutines_version"
|
||||
api "org.jetbrains.kotlinx:kotlinx-serialization-runtime:$kotlin_serialisation_runtime_version"
|
||||
api "org.jetbrains.kotlinx:kotlinx-serialization-cbor:$kotlin_serialisation_runtime_version"
|
||||
}
|
||||
}
|
||||
jvmTest {
|
||||
@ -71,8 +62,8 @@ kotlin {
|
||||
jsMain {
|
||||
dependencies {
|
||||
implementation kotlin('stdlib-js')
|
||||
api "org.jetbrains.kotlinx:kotlinx-coroutines-core-js:$kotlin_coroutines_version"
|
||||
api "org.jetbrains.kotlinx:kotlinx-serialization-runtime-js:$kotlin_serialisation_runtime_version"
|
||||
api "org.jetbrains.kotlinx:kotlinx-serialization-cbor-js:$kotlin_serialisation_runtime_version"
|
||||
}
|
||||
}
|
||||
jsTest {
|
0
ktor/common/publish.gradle
Normal file
0
ktor/common/publish.gradle
Normal file
1
ktor/common/publish_config.kpsb
Normal file
1
ktor/common/publish_config.kpsb
Normal file
@ -0,0 +1 @@
|
||||
{"bintrayConfig":{"repo":"InsanusMokrassar","packageName":"${project.name}","packageVcs":"https://github.com/PostsSystem/PostsSystemCore"},"licenses":[{"id":"Apache-2.0","title":"Apache Software License 2.0","url":"https://git.insanusmokrassar.com/PostsSystem/Core/src/master/LICENSE"}],"mavenConfig":{"name":"PostsSystem Exposed commons","description":"Common utils for all exposed modules","url":"https://git.insanusmokrassar.com/PostsSystem/Core/","vcsUrl":"https://git.insanusmokrassar.com/PostsSystem/Core/.git","developers":[{"id":"InsanusMokrassar","name":"Ovsiannikov Aleksei","eMail":"ovsyannikov.alexey95@gmail.com"}]},"type":"Multiplatform"}
|
@ -0,0 +1,5 @@
|
||||
package com.insanusmokrassar.postssystem.ktor
|
||||
|
||||
import kotlinx.serialization.cbor.Cbor
|
||||
|
||||
val standardKtorSerializer = Cbor
|
@ -41,9 +41,9 @@ kotlin {
|
||||
api "org.jetbrains.kotlinx:kotlinx-serialization-runtime-common:$kotlin_serialisation_runtime_version"
|
||||
|
||||
if ((project.hasProperty('RELEASE_MODE') && project.property('RELEASE_MODE') == "true") || System.getenv('RELEASE_MODE') == "true") {
|
||||
api "com.insanusmokrassar:postssystem.core:$core_version"
|
||||
api "com.insanusmokrassar:postssystem.core.api:$core_version"
|
||||
} else {
|
||||
api project(":postssystem.core")
|
||||
api project(":core:api")
|
||||
}
|
||||
|
||||
api "com.soywiz.korlibs.klock:klock:$klockVersion"
|
@ -13,8 +13,8 @@ buildscript {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id "org.jetbrains.kotlin.multiplatform" version "$kotlin_version"
|
||||
id "org.jetbrains.kotlin.plugin.serialization" version "$kotlin_version"
|
||||
id "org.jetbrains.kotlin.multiplatform"
|
||||
id "org.jetbrains.kotlin.plugin.serialization"
|
||||
}
|
||||
|
||||
project.version = "$core_version"
|
||||
@ -43,7 +43,7 @@ kotlin {
|
||||
if ((project.hasProperty('RELEASE_MODE') && project.property('RELEASE_MODE') == "true") || System.getenv('RELEASE_MODE') == "true") {
|
||||
api "com.insanusmokrassar:postssystem.markups.core:$core_version"
|
||||
} else {
|
||||
api project(":postssystem.markups.core")
|
||||
api project(":markups")
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.insanusmokrassar.postssystem.markups.html
|
||||
|
||||
import com.insanusmokrassar.postssystem.core.content.api.ReadContentRepo
|
||||
import com.insanusmokrassar.postssystem.core.post.repo.ReadPostsRepo
|
||||
import kotlinx.html.FlowContent
|
||||
|
||||
//abstract class HtmlMarkupPlugin(
|
||||
// postsRepo: ReadPostsRepo,
|
||||
// postsContentRepo: ReadContentRepo
|
||||
//) : AbstractMarkupPlugin<FlowContent>(postsRepo, postsContentRepo)
|
@ -0,0 +1,10 @@
|
||||
package com.insanusmokrassar.postssystem.markups.html
|
||||
|
||||
import com.insanusmokrassar.postssystem.core.content.api.ReadContentRepo
|
||||
import com.insanusmokrassar.postssystem.core.post.repo.ReadPostsRepo
|
||||
import kotlinx.html.FlowContent
|
||||
|
||||
//abstract class HtmlMarkupPlugin(
|
||||
// postsRepo: ReadPostsRepo,
|
||||
// postsContentRepo: ReadContentRepo
|
||||
//) : AbstractMarkupPlugin<FlowContent>(postsRepo, postsContentRepo)
|
@ -0,0 +1,24 @@
|
||||
package com.insanusmokrassar.postssystem.markups.core
|
||||
|
||||
import com.insanusmokrassar.postssystem.core.content.RegisteredContent
|
||||
import com.insanusmokrassar.postssystem.core.content.api.ReadContentRepo
|
||||
import com.insanusmokrassar.postssystem.core.post.PostId
|
||||
import com.insanusmokrassar.postssystem.core.post.RegisteredPost
|
||||
import com.insanusmokrassar.postssystem.core.post.repo.ReadPostsRepo
|
||||
|
||||
//abstract class AbstractMarkupPlugin<MarkupTarget>(
|
||||
// @Suppress("MemberVisibilityCanBePrivate")
|
||||
// protected val postsRepo: ReadPostsRepo,
|
||||
// @Suppress("MemberVisibilityCanBePrivate")
|
||||
// protected val postsContentRepo: ReadContentRepo
|
||||
//) : MarkupPlugin<MarkupTarget> {
|
||||
// override suspend fun drawMarkupBuilder(on: MarkupTarget, postId: PostId) {
|
||||
// val post = postsRepo.getPostById(postId) ?: return
|
||||
// val contents = post.content.mapNotNull {
|
||||
// postsContentRepo.getContentById(it)
|
||||
// }
|
||||
// drawMarkupBuilder(on, post, contents)
|
||||
// }
|
||||
//
|
||||
// abstract suspend fun drawMarkupBuilder(target: MarkupTarget, forPost: RegisteredPost, content: List<RegisteredContent>)
|
||||
//}
|
@ -1,24 +0,0 @@
|
||||
package com.insanusmokrassar.postssystem.markups.core
|
||||
|
||||
import com.insanusmokrassar.postssystem.core.content.RegisteredContent
|
||||
import com.insanusmokrassar.postssystem.core.content.api.ReadContentRepo
|
||||
import com.insanusmokrassar.postssystem.core.post.PostId
|
||||
import com.insanusmokrassar.postssystem.core.post.RegisteredPost
|
||||
import com.insanusmokrassar.postssystem.core.post.repo.ReadPostsRepo
|
||||
|
||||
abstract class AbstractMarkupPlugin<MarkupTarget>(
|
||||
@Suppress("MemberVisibilityCanBePrivate")
|
||||
protected val postsRepo: ReadPostsRepo,
|
||||
@Suppress("MemberVisibilityCanBePrivate")
|
||||
protected val postsContentRepo: ReadContentRepo
|
||||
) : MarkupPlugin<MarkupTarget> {
|
||||
override suspend fun drawMarkupBuilder(on: MarkupTarget, postId: PostId) {
|
||||
val post = postsRepo.getPostById(postId) ?: return
|
||||
val contents = post.content.mapNotNull {
|
||||
postsContentRepo.getContentById(it)
|
||||
}
|
||||
drawMarkupBuilder(on, post, contents)
|
||||
}
|
||||
|
||||
abstract suspend fun drawMarkupBuilder(target: MarkupTarget, forPost: RegisteredPost, content: List<RegisteredContent>)
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
package com.insanusmokrassar.postssystem.markups.html
|
||||
|
||||
import com.insanusmokrassar.postssystem.core.content.api.ReadContentRepo
|
||||
import com.insanusmokrassar.postssystem.core.post.repo.ReadPostsRepo
|
||||
import com.insanusmokrassar.postssystem.markups.core.AbstractMarkupPlugin
|
||||
import kotlinx.html.FlowContent
|
||||
|
||||
abstract class HtmlMarkupPlugin(
|
||||
postsRepo: ReadPostsRepo,
|
||||
postsContentRepo: ReadContentRepo
|
||||
) : AbstractMarkupPlugin<FlowContent>(postsRepo, postsContentRepo)
|
@ -1,11 +0,0 @@
|
||||
package com.insanusmokrassar.postssystem.markups.html
|
||||
|
||||
import com.insanusmokrassar.postssystem.core.content.api.ReadContentRepo
|
||||
import com.insanusmokrassar.postssystem.core.post.repo.ReadPostsRepo
|
||||
import com.insanusmokrassar.postssystem.markups.core.AbstractMarkupPlugin
|
||||
import kotlinx.html.FlowContent
|
||||
|
||||
abstract class HtmlMarkupPlugin(
|
||||
postsRepo: ReadPostsRepo,
|
||||
postsContentRepo: ReadContentRepo
|
||||
) : AbstractMarkupPlugin<FlowContent>(postsRepo, postsContentRepo)
|
@ -39,9 +39,9 @@ kotlin {
|
||||
implementation kotlin('stdlib')
|
||||
|
||||
if ((project.hasProperty('RELEASE_MODE') && project.property('RELEASE_MODE') == "true") || System.getenv('RELEASE_MODE') == "true") {
|
||||
api "com.insanusmokrassar:postssystem.core:$core_version"
|
||||
api "com.insanusmokrassar:postssystem.core.api:$core_version"
|
||||
} else {
|
||||
api project(":postssystem.core")
|
||||
api project(":core:api")
|
||||
}
|
||||
}
|
||||
}
|
@ -37,8 +37,8 @@ dependencies {
|
||||
api "com.insanusmokrassar:postssystem.core.publishing:$core_version"
|
||||
api "com.insanusmokrassar:postssystem.exposed.commons:$core_version"
|
||||
} else {
|
||||
api project(":postssystem.core.publishing")
|
||||
api project(":postssystem.exposed.commons")
|
||||
api project(":publishing:api")
|
||||
api project(":exposed:commons")
|
||||
}
|
||||
|
||||
testImplementation "org.xerial:sqlite-jdbc:$test_sqlite_version"
|
@ -1,14 +1,26 @@
|
||||
rootProject.name='postssystem'
|
||||
|
||||
include ':postssystem.utils.repos'
|
||||
include ':postssystem.exposed.commons'
|
||||
include ':postssystem.utils.repos.exposed'
|
||||
String[] includes = [
|
||||
':utils:repos',
|
||||
':utils:repos:exposed',
|
||||
|
||||
include ':postssystem.core'
|
||||
include ':postssystem.core.exposed'
|
||||
':exposed:commons',
|
||||
|
||||
include ':postssystem.core.publishing'
|
||||
include ':postssystem.core.publishing.exposed'
|
||||
':ktor:common',
|
||||
':ktor:client',
|
||||
|
||||
include ':postssystem.markups.core'
|
||||
include ':postssystem.markups.html'
|
||||
':core:api',
|
||||
':core:exposed',
|
||||
':core:ktor:common',
|
||||
':core:ktor:client',
|
||||
|
||||
':publishing:api',
|
||||
':publishing:exposed',
|
||||
|
||||
':markups',
|
||||
':markups:html'
|
||||
]
|
||||
|
||||
includes.each {
|
||||
include it
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ buildscript {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id "org.jetbrains.kotlin.plugin.serialization" version "$kotlin_version"
|
||||
id "org.jetbrains.kotlin.plugin.serialization"
|
||||
}
|
||||
|
||||
project.version = "$core_version"
|
||||
@ -31,14 +31,14 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
|
||||
if ((project.hasProperty('RELEASE_MODE') && project.property('RELEASE_MODE') == "true") || System.getenv('RELEASE_MODE') == "true") {
|
||||
api "com.insanusmokrassar:postssystem.utils.repos:$core_version"
|
||||
api "com.insanusmokrassar:postssystem.exposed.commons:$core_version"
|
||||
} else {
|
||||
api project(":postssystem.utils.repos")
|
||||
api project(":postssystem.exposed.commons")
|
||||
api project(":utils:repos")
|
||||
api project(":exposed:commons")
|
||||
}
|
||||
|
||||
testImplementation "org.xerial:sqlite-jdbc:$test_sqlite_version"
|
53
utils/repos/exposed/maven.publish.gradle
Normal file
53
utils/repos/exposed/maven.publish.gradle
Normal file
@ -0,0 +1,53 @@
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
task javadocsJar(type: Jar) {
|
||||
classifier = 'javadoc'
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
project.publishing.publications.all {
|
||||
// rename artifacts
|
||||
groupId "${project.group}"
|
||||
if (it.name.contains('kotlinMultiplatform')) {
|
||||
artifactId = "${project.name}"
|
||||
} else {
|
||||
artifactId = "${project.name}-$name"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications.all {
|
||||
artifact javadocsJar
|
||||
|
||||
pom {
|
||||
description = "Common utils for all exposed modules"
|
||||
name = "PostsSystem Exposed commons"
|
||||
url = "https://git.insanusmokrassar.com/PostsSystem/Core/"
|
||||
|
||||
scm {
|
||||
developerConnection = "scm:git:[fetch=]https://git.insanusmokrassar.com/PostsSystem/Core/.git[push=]https://git.insanusmokrassar.com/PostsSystem/Core/.git"
|
||||
url = "https://git.insanusmokrassar.com/PostsSystem/Core/.git"
|
||||
}
|
||||
|
||||
developers {
|
||||
|
||||
developer {
|
||||
id = "InsanusMokrassar"
|
||||
name = "Ovsiannikov Aleksei"
|
||||
email = "ovsyannikov.alexey95@gmail.com"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
licenses {
|
||||
|
||||
license {
|
||||
name = "Apache Software License 2.0"
|
||||
url = "https://git.insanusmokrassar.com/PostsSystem/Core/src/master/LICENSE"
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
1
utils/repos/exposed/publish_config.kpsb
Normal file
1
utils/repos/exposed/publish_config.kpsb
Normal file
@ -0,0 +1 @@
|
||||
{"bintrayConfig":{"repo":"InsanusMokrassar","packageName":"${project.name}","packageVcs":"https://github.com/PostsSystem/PostsSystemCore"},"licenses":[{"id":"Apache-2.0","title":"Apache Software License 2.0","url":"https://git.insanusmokrassar.com/PostsSystem/Core/src/master/LICENSE"}],"mavenConfig":{"name":"PostsSystem Exposed commons","description":"Common utils for all exposed modules","url":"https://git.insanusmokrassar.com/PostsSystem/Core/","vcsUrl":"https://git.insanusmokrassar.com/PostsSystem/Core/.git","developers":[{"id":"InsanusMokrassar","name":"Ovsiannikov Aleksei","eMail":"ovsyannikov.alexey95@gmail.com"}]},"type":"Multiplatform"}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user