diff --git a/app/build.gradle.kts b/app/build.gradle.kts index fa266d7..ce8469c 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - id("docsly.base-conventions") + id("docsly.base") } dependencies { diff --git a/app/src/main/kotlin/Application.kt b/app/src/main/kotlin/Application.kt index c4abc72..7a9948f 100644 --- a/app/src/main/kotlin/Application.kt +++ b/app/src/main/kotlin/Application.kt @@ -1,9 +1,31 @@ +/** + * MIT License + * + * Copyright (c) 2019-2022 TriumphTeam and Contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ package dev.triumphteam.docsly import com.zaxxer.hikari.HikariDataSource import dev.triumphteam.docsly.config.createOrGetConfig import dev.triumphteam.docsly.meilisearch.Meili -import dev.triumphteam.docsly.meilisearch.search import dev.triumphteam.docsly.resource.Api import io.ktor.server.application.Application import io.ktor.server.application.install @@ -11,8 +33,10 @@ import io.ktor.server.engine.embeddedServer import io.ktor.server.netty.Netty import io.ktor.server.resources.Resources import io.ktor.server.resources.get +import io.ktor.server.routing.get import io.ktor.server.routing.routing import org.jetbrains.exposed.sql.Database +import org.jetbrains.exposed.sql.transactions.transaction private val config = createOrGetConfig() @@ -31,7 +55,10 @@ public fun Application.module() { // Here you handle the "api/{index}/search" endpoint // Getting the index passed - search(it.parent.index, "") + // search(it.parent.index, "") + transaction { + // DocDao.find { DocsTable.name eq "Ass" }.firstOrNull() + } } } } diff --git a/app/src/main/kotlin/config/Configuration.kt b/app/src/main/kotlin/config/Configuration.kt index e00f768..12aec02 100644 --- a/app/src/main/kotlin/config/Configuration.kt +++ b/app/src/main/kotlin/config/Configuration.kt @@ -1,3 +1,26 @@ +/** + * MIT License + * + * Copyright (c) 2019-2022 TriumphTeam and Contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ package dev.triumphteam.docsly.config import com.typesafe.config.ConfigFactory diff --git a/app/src/main/kotlin/config/serializer/ProtocolSerializer.kt b/app/src/main/kotlin/config/serializer/ProtocolSerializer.kt index 1205374..57223cc 100644 --- a/app/src/main/kotlin/config/serializer/ProtocolSerializer.kt +++ b/app/src/main/kotlin/config/serializer/ProtocolSerializer.kt @@ -1,3 +1,26 @@ +/** + * MIT License + * + * Copyright (c) 2019-2022 TriumphTeam and Contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ package dev.triumphteam.docsly.config.serializer import io.ktor.http.URLProtocol diff --git a/app/src/main/kotlin/database/Tables.kt b/app/src/main/kotlin/database/Tables.kt index af70254..989d92f 100644 --- a/app/src/main/kotlin/database/Tables.kt +++ b/app/src/main/kotlin/database/Tables.kt @@ -1,3 +1,26 @@ +/** + * MIT License + * + * Copyright (c) 2019-2022 TriumphTeam and Contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ package dev.triumphteam.docsly.database import org.jetbrains.exposed.dao.id.IntIdTable diff --git a/app/src/main/kotlin/database/exposed/EnumSetColumn.kt b/app/src/main/kotlin/database/exposed/EnumSetColumn.kt index 5e9899b..722e45c 100644 --- a/app/src/main/kotlin/database/exposed/EnumSetColumn.kt +++ b/app/src/main/kotlin/database/exposed/EnumSetColumn.kt @@ -1,3 +1,26 @@ +/** + * MIT License + * + * Copyright (c) 2019-2022 TriumphTeam and Contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ package dev.triumphteam.docsly.database.exposed import com.impossibl.postgres.jdbc.PGArray @@ -10,7 +33,7 @@ import org.jetbrains.exposed.sql.vendors.currentDialect import kotlin.reflect.KClass public inline fun > Table.enumerationSet(name: String): Column> = - registerColumn>(name, EnumSetColumnType(T::class)) + registerColumn(name, EnumSetColumnType(T::class)) public class EnumSetColumnType>(private val klass: KClass) : ColumnType() { diff --git a/app/src/main/kotlin/database/exposed/SerializableColumn.kt b/app/src/main/kotlin/database/exposed/SerializableColumn.kt index e26fe64..e1d921f 100644 --- a/app/src/main/kotlin/database/exposed/SerializableColumn.kt +++ b/app/src/main/kotlin/database/exposed/SerializableColumn.kt @@ -1,3 +1,26 @@ +/** + * MIT License + * + * Copyright (c) 2019-2022 TriumphTeam and Contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ package dev.triumphteam.docsly.database.exposed import com.impossibl.postgres.jdbc.PGArray @@ -37,7 +60,7 @@ public class SerializableColumnType( } public inline fun Table.serializableList(name: String, serializer: KSerializer): Column> = - registerColumn>(name, SerializableListColumnType(T::class, ListSerializer(serializer))) + registerColumn(name, SerializableListColumnType(T::class, ListSerializer(serializer))) @Suppress("UNCHECKED_CAST") public class SerializableListColumnType( diff --git a/app/src/main/kotlin/meilisearch/ApiAuthProvider.kt b/app/src/main/kotlin/meilisearch/ApiAuthProvider.kt index dce3235..42049f0 100644 --- a/app/src/main/kotlin/meilisearch/ApiAuthProvider.kt +++ b/app/src/main/kotlin/meilisearch/ApiAuthProvider.kt @@ -1,3 +1,26 @@ +/** + * MIT License + * + * Copyright (c) 2019-2022 TriumphTeam and Contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ package dev.triumphteam.docsly.meilisearch import io.ktor.client.plugins.auth.Auth diff --git a/app/src/main/kotlin/meilisearch/MeiliClient.kt b/app/src/main/kotlin/meilisearch/MeiliClient.kt index ad13133..ed1b4de 100644 --- a/app/src/main/kotlin/meilisearch/MeiliClient.kt +++ b/app/src/main/kotlin/meilisearch/MeiliClient.kt @@ -1,3 +1,26 @@ +/** + * MIT License + * + * Copyright (c) 2019-2022 TriumphTeam and Contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ package dev.triumphteam.docsly.meilisearch import dev.triumphteam.docsly.meilisearch.annotation.PrimaryKey @@ -72,7 +95,7 @@ public class MeiliClient( /** [search] but returns all the data ([SearchResult]) provided by the search. */ public suspend inline fun searchFull(query: String, filter: Map): SearchResult { - // TODO: Handle errors + // TODO: Handle errors. return client.post(Indexes.Uid.Search(Indexes.Uid(uid = uid))) { setBody(SearchRequest(query, filter)) }.body() diff --git a/app/src/main/kotlin/meilisearch/MeiliPlugin.kt b/app/src/main/kotlin/meilisearch/MeiliPlugin.kt index 38172a5..bcb807e 100644 --- a/app/src/main/kotlin/meilisearch/MeiliPlugin.kt +++ b/app/src/main/kotlin/meilisearch/MeiliPlugin.kt @@ -1,3 +1,26 @@ +/** + * MIT License + * + * Copyright (c) 2019-2022 TriumphTeam and Contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ package dev.triumphteam.docsly.meilisearch import dev.triumphteam.docsly.config.MeiliConfig @@ -15,10 +38,10 @@ public class Meili(config: Configuration) { public val client: MeiliClient = config.createClient() public class Configuration { - public var host: String = "0.0.0.0" - public var port: Int = 7700 - public var apiKey: String = "masterKey" - public var protocol: URLProtocol = URLProtocol.HTTP + private var host: String = "0.0.0.0" + private var port: Int = 7700 + private var apiKey: String = "masterKey" + private var protocol: URLProtocol = URLProtocol.HTTP public fun config(config: MeiliConfig) { host = config.host diff --git a/app/src/main/kotlin/meilisearch/annotation/PrimaryKey.kt b/app/src/main/kotlin/meilisearch/annotation/PrimaryKey.kt index 6a5b192..5c726f3 100644 --- a/app/src/main/kotlin/meilisearch/annotation/PrimaryKey.kt +++ b/app/src/main/kotlin/meilisearch/annotation/PrimaryKey.kt @@ -1,3 +1,26 @@ +/** + * MIT License + * + * Copyright (c) 2019-2022 TriumphTeam and Contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ package dev.triumphteam.docsly.meilisearch.annotation @Retention(AnnotationRetention.RUNTIME) diff --git a/build-logic/src/main/kotlin/docsly.base-conventions.gradle.kts b/build-logic/src/main/kotlin/docsly.base.gradle.kts similarity index 98% rename from build-logic/src/main/kotlin/docsly.base-conventions.gradle.kts rename to build-logic/src/main/kotlin/docsly.base.gradle.kts index 0d1db19..05a8482 100644 --- a/build-logic/src/main/kotlin/docsly.base-conventions.gradle.kts +++ b/build-logic/src/main/kotlin/docsly.base.gradle.kts @@ -16,7 +16,7 @@ repositories { } dependencies { - implementation(kotlin("stdlib")) + api(kotlin("stdlib")) api(libs.kotlinx.serialization.json) api(libs.kotlinx.coroutines) } diff --git a/build-logic/src/main/kotlin/docsly.library-conventions.gradle.kts b/build-logic/src/main/kotlin/docsly.library.gradle.kts similarity index 97% rename from build-logic/src/main/kotlin/docsly.library-conventions.gradle.kts rename to build-logic/src/main/kotlin/docsly.library.gradle.kts index 4be9ad1..b67c5cc 100644 --- a/build-logic/src/main/kotlin/docsly.library-conventions.gradle.kts +++ b/build-logic/src/main/kotlin/docsly.library.gradle.kts @@ -7,7 +7,7 @@ plugins { signing } -val dokkaOutputDir = "$buildDir/dokka" +val dokkaOutputDir = "${layout.buildDirectory}/dokka" tasks { dokkaHtml { diff --git a/build-logic/src/main/kotlin/docsly.parent-conventions.gradle.kts b/build-logic/src/main/kotlin/docsly.parent.gradle.kts similarity index 100% rename from build-logic/src/main/kotlin/docsly.parent-conventions.gradle.kts rename to build-logic/src/main/kotlin/docsly.parent.gradle.kts diff --git a/build.gradle.kts b/build.gradle.kts index c9a0453..f889982 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,3 +1,3 @@ plugins { - id("docsly.parent-conventions") + id("docsly.parent") } diff --git a/common/build.gradle.kts b/common/build.gradle.kts index 5728987..463ead4 100644 --- a/common/build.gradle.kts +++ b/common/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - id("docsly.base-conventions") + id("docsly.base") } dependencies { diff --git a/common/src/main/kotlin/resource/ApiResources.kt b/common/src/main/kotlin/resource/ApiResources.kt index 943514f..ea10d75 100644 --- a/common/src/main/kotlin/resource/ApiResources.kt +++ b/common/src/main/kotlin/resource/ApiResources.kt @@ -1,3 +1,26 @@ +/** + * MIT License + * + * Copyright (c) 2019-2022 TriumphTeam and Contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ package dev.triumphteam.docsly.resource import io.ktor.resources.Resource diff --git a/dokka-plugin/build.gradle.kts b/dokka-plugin/build.gradle.kts index 2351fd9..fb191d1 100644 --- a/dokka-plugin/build.gradle.kts +++ b/dokka-plugin/build.gradle.kts @@ -1,6 +1,6 @@ plugins { - id("docsly.base-conventions") - id("docsly.library-conventions") + id("docsly.base") + id("docsly.library") } dependencies { diff --git a/dokka-plugin/src/main/kotlin/DocslyDokkaPlugin.kt b/dokka-plugin/src/main/kotlin/DocslyDokkaPlugin.kt index fda2a11..cf4217d 100644 --- a/dokka-plugin/src/main/kotlin/DocslyDokkaPlugin.kt +++ b/dokka-plugin/src/main/kotlin/DocslyDokkaPlugin.kt @@ -28,8 +28,10 @@ import org.jetbrains.dokka.CoreExtensions import org.jetbrains.dokka.base.DokkaBase import org.jetbrains.dokka.base.resolvers.local.LocationProviderFactory import org.jetbrains.dokka.plugability.DokkaPlugin +import org.jetbrains.dokka.plugability.DokkaPluginApiPreview import org.jetbrains.dokka.plugability.Extension import org.jetbrains.dokka.plugability.ExtensionPoint +import org.jetbrains.dokka.plugability.PluginApiPreviewAcknowledgement import org.jetbrains.dokka.renderers.Renderer public class DocslyDokkaPlugin : DokkaPlugin() { @@ -40,4 +42,9 @@ public class DocslyDokkaPlugin : DokkaPlugin() { public val renderer: Extension by extending { CoreExtensions.renderer providing ::JsonRenderer override dokkaBase.htmlRenderer } + + @OptIn(DokkaPluginApiPreview::class) + override fun pluginApiPreviewAcknowledgement(): PluginApiPreviewAcknowledgement { + return PluginApiPreviewAcknowledgement + } } diff --git a/gradle-plugin/build.gradle.kts b/gradle-plugin/build.gradle.kts index d27342c..e032d75 100644 --- a/gradle-plugin/build.gradle.kts +++ b/gradle-plugin/build.gradle.kts @@ -1,7 +1,7 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar plugins { - id("docsly.base-conventions") + id("docsly.base") id("com.gradle.plugin-publish") version "1.1.0" id("com.github.johnrengelman.shadow") version "7.1.2" signing diff --git a/gradle-plugin/src/main/kotlin/DocslyGradlePlugin.kt b/gradle-plugin/src/main/kotlin/DocslyGradlePlugin.kt index c35c160..95da0fe 100644 --- a/gradle-plugin/src/main/kotlin/DocslyGradlePlugin.kt +++ b/gradle-plugin/src/main/kotlin/DocslyGradlePlugin.kt @@ -1,3 +1,26 @@ +/** + * MIT License + * + * Copyright (c) 2019-2022 TriumphTeam and Contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ package dev.triumphteam.docsly import org.gradle.api.DefaultTask diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 18df5cb..7427318 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,16 +1,16 @@ [versions] -kotlin = "1.7.21" -kotlinx-serialization = "1.4.1" -kotlinx-coroutines = "1.6.4" +kotlin = "1.9.0" +kotlinx-serialization = "1.6.0" +kotlinx-coroutines = "1.7.3" license = "0.16.1" -dokka = "1.7.20" +dokka = "1.9.0" # Rest -ktor = "2.2.1" +ktor = "2.3.4" # DB -exposed = "0.40.1" +exposed = "0.44.0" postgres = "0.8.9" hikari = "5.0.1" @@ -49,6 +49,7 @@ ktor-client-resources = { module = "io.ktor:ktor-client-resources", version.ref # DB exposed = { module = "org.jetbrains.exposed:exposed-jdbc", version.ref = "exposed" } +exposed-jdbc = { module = "org.jetbrains.exposed:exposed-jdbc", version.ref = "exposed" } hikari = { module = "com.zaxxer:HikariCP", version.ref = "hikari" } postgres = { module = "com.impossibl.pgjdbc-ng:pgjdbc-ng", version.ref = "postgres" } @@ -89,6 +90,7 @@ logger = [ ] database = [ "exposed", + "exposed-jdbc", "hikari", "postgres" ] diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f42e62f..27313fb 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/serializable/build.gradle.kts b/serializable/build.gradle.kts index 158a2c1..6a942de 100644 --- a/serializable/build.gradle.kts +++ b/serializable/build.gradle.kts @@ -1,4 +1,4 @@ plugins { - id("docsly.base-conventions") - id("docsly.library-conventions") + id("docsly.base") + id("docsly.library") }