Skip to content

Commit

Permalink
Publishing to Maven Central using in memory keys.
Browse files Browse the repository at this point in the history
  • Loading branch information
gerak-cz committed Apr 24, 2024
1 parent b685e2d commit 52008b9
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 10 deletions.
59 changes: 49 additions & 10 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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<DokkaPlugin>()
apply<MavenPublishPlugin>()

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://[email protected]:cleverlance/linguine.git"
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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" }
Expand Down
17 changes: 17 additions & 0 deletions license.md
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 52008b9

Please sign in to comment.