Skip to content

Commit

Permalink
build: Releases to Central (#11)
Browse files Browse the repository at this point in the history
* Add POM metadata
* Add Javadoc jar
* Disable signing for local build (when key is not provided)
* Fix property in release.yml
* Fix version of dependency in examples
  • Loading branch information
petertrr authored Jan 26, 2022
1 parent 1f72d3f commit ab70225
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 6 deletions.
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ jobs:
arguments: |
publishToSonatype
closeSonatypeStagingRepository
-Preckon.stage=final
-PsonatypeUsername=${{ secrets.SONATYPE_USER }}
-PsonatypePassword=${{ secrets.SONATYPE_PASSWORD }}
- name: gradle snapshot from branch
Expand Down
41 changes: 38 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ reckon {
snapshotFromProp()
}

java {
withJavadocJar()
}

application {
mainClass.set("org.cqfn.save.adapter.RunnerKt")
}
Expand All @@ -38,14 +42,45 @@ publishing {
}
publications {
create<MavenPublication>("maven") {
from(components["kotlin"])
from(components["java"])
pom {
name.set(project.name)
description.set(project.description ?: project.name)
url.set("https://github.com/analysis-dev/serialization-adapters")
licenses {
license {
name.set("MIT License")
url.set("http://www.opensource.org/licenses/mit-license.php")
distribution.set("repo")
}
}
developers {
developer {
id.set("petertrr")
name.set("Petr Trifanov")
email.set("[email protected]")
}
developer {
id.set("akuleshov7")
name.set("Andrey Kuleshov")
email.set("[email protected]")
}
}
scm {
url.set("https://github.com/cqfn/save")
connection.set("scm:git:git://github.com/cqfn/save.git")
}
}
}
}
}

signing {
useInMemoryPgpKeys(System.getenv("GPG_SEC"), System.getenv("GPG_PASSWORD"))
sign(*extensions.getByType<PublishingExtension>().publications.toTypedArray())
val gpgSecret = System.getenv("GPG_SEC")
if (gpgSecret != null) {
useInMemoryPgpKeys(gpgSecret, System.getenv("GPG_PASSWORD"))
sign(*extensions.getByType<PublishingExtension>().publications.toTypedArray())
}
}

nexusPublishing {
Expand Down
2 changes: 1 addition & 1 deletion examples/csv-example/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

dependencies {
implementation("org.cqfn.save:save-adapters:0.1.0-SNAPSHOT")
implementation("org.cqfn.save:save-adapters:0.1.0")
implementation("de.brudaswen.kotlinx.serialization:kotlinx-serialization-csv:2.0.0")
}

Expand Down
2 changes: 1 addition & 1 deletion examples/json-example/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ plugins {
}

dependencies {
implementation("org.cqfn.save:save-adapters:0.1.0-SNAPSHOT")
implementation("org.cqfn.save:save-adapters:0.1.0")
}

0 comments on commit ab70225

Please sign in to comment.