diff --git a/build.gradle.kts b/build.gradle.kts index 210621a..133dafb 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,26 +1,65 @@ +import com.vanniktech.maven.publish.MavenPublishPlugin +import com.vanniktech.maven.publish.SonatypeHost import io.gitlab.arturbosch.detekt.Detekt +import org.jetbrains.dokka.gradle.DokkaPlugin plugins { alias(libs.plugins.kotlin.multiplatform) apply false alias(libs.plugins.gradle.buildconfig) apply false + alias(libs.plugins.gradle.maven.publish) apply true alias(libs.plugins.detekt) apply true - `maven-publish` + alias(libs.plugins.dokka) apply false } subprojects { + apply() apply() group = "io.github.cleverlance.linguine" - version = "0.1.0-SNAPSHOT" - - publishing { - repositories { - maven { - url = uri("https://nexus.cleverlance.com/nexus/repository/maven-snapshots/") - credentials { - username = System.getenv("NEXUS_USERNAME") - password = System.getenv("NEXUS_PASSWORD") + version = "0.1.0" + + mavenPublishing { + publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL) + signAllPublications() + + pom { + name = "Linguine" + description = "Simplifies the localization process in Kotlin projects." + inceptionYear = "2024" + url = "https://github.com/cleverlance/linguine/" + licenses { + license { + name = "The MIT License" + url = "https://github.com/cleverlance/linguine/blob/main/license.md" + distribution = "https://github.com/cleverlance/linguine/blob/main/license.md" + } + } + developers { + developer { + id = "gerak-cz" + name = "Bořek Leikep" + url = "https://github.com/gerak-cz" } + developer { + id = "RealDanie1" + name = "Daniel Pecuch" + url = "https://github.com/RealDanie1" + } + developer { + id = "RadekKuzel" + name = "Radek Kůžel" + url = "https://github.com/RadekKuzel" + } + developer { + id = "JiriHromek" + name = "Jiří Hromek" + url = "https://github.com/JiriHromek" + } + } + scm { + url = "https://github.com/cleverlance/linguine/" + connection = "scm:git:git://github.com/cleverlance/linguine.git" + developerConnection = "scm:git:ssh://git@github.com:cleverlance/linguine.git" } } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index c9e177f..289024a 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -3,7 +3,9 @@ kotlin = "1.9.20" kotlinx-serialization = "1.6.3" kotlinPoet = "1.16.0" gradle-buildconfig = "5.3.5" +gradle-maven-publish = "0.28.0" detekt = "1.23.3" +dokka = "1.9.20" gson = "2.10.1" kotest = "5.6.2" mockk = "1.12.0" @@ -12,7 +14,9 @@ kermit = "2.0.3" [plugins] kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } gradle-buildconfig = { id = "com.github.gmazzo.buildconfig", version.ref = "gradle-buildconfig" } +gradle-maven-publish = { id = "com.vanniktech.maven.publish", version.ref = "gradle-maven-publish" } detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" } +dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" } [libraries] kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinx-serialization" } diff --git a/license.md b/license.md new file mode 100644 index 0000000..7a9a30a --- /dev/null +++ b/license.md @@ -0,0 +1,17 @@ +The MIT License +=============== + +Copyright 2024 Qinshift + +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.