-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adjust POM file * Use KMP-lokalise-api from maven central * Adjust group and artifact id * Sign artifacts * Add sonatype repositories * Add GH Actions for CD * Update version to SNAPSHOT * Adjust README * Adjust tests * Update README
- Loading branch information
Showing
7 changed files
with
103 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: 'Publish Snapshot' | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
|
||
env: | ||
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }} | ||
GPG_SIGNING_PASSWORD: ${{ secrets.GPG_SIGNING_PASSWORD }} | ||
SONATYPE_USER: ${{ secrets.SONATYPE_USER }} | ||
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | ||
|
||
jobs: | ||
publish-snapshot: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Publish to Sonatype Snapshot | ||
run: ./gradlew publishAllPublicationsToSonatypeSnapshotRepository |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: 'Publish Maven Central Staging' | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
env: | ||
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }} | ||
GPG_SIGNING_PASSWORD: ${{ secrets.GPG_SIGNING_PASSWORD }} | ||
SONATYPE_USER: ${{ secrets.SONATYPE_USER }} | ||
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Publish to Sonatype Staging | ||
run: ./gradlew publishAllPublicationsToSonatypeStagingRepository |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,15 +2,11 @@ plugins { | |
alias(libs.plugins.kotlin) | ||
`java-gradle-plugin` | ||
`maven-publish` | ||
signing | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
maven(url = "https://jitpack.io") { | ||
content { | ||
includeGroup("com.github.ioki-mobility.kmp-lokalise-api") | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
|
@@ -34,13 +30,15 @@ java { | |
withJavadocJar() | ||
} | ||
|
||
version = "2.0.0" | ||
group = "com.ioki" | ||
version = "2.1.0-SNAPSHOT" | ||
group = "com.ioki.lokalise" | ||
publishing { | ||
publications { | ||
register("pluginMaven", MavenPublication::class.java) { | ||
artifactId = "lokalise" | ||
artifactId = "lokalise-gradle-plugin" | ||
pom { | ||
name.set("LokaliseGradlePlugin") | ||
description.set("A Gradle plugin that can up- and download strings from lokalise") | ||
url.set("https://github.com/ioki-mobility/LokaliseGradlePlugin") | ||
licenses { | ||
license { | ||
|
@@ -58,20 +56,44 @@ publishing { | |
email.set("[email protected]") | ||
url.set("https://StefMa.guru") | ||
organization.set("ioki") | ||
organizationUrl.set("https://ioki.com") | ||
} | ||
} | ||
scm { | ||
url.set("https://github.com/ioki-mobility/LokaliseGradlePlugin") | ||
connection.set("https://github.com/ioki-mobility/LokaliseGradlePlugin.git") | ||
developerConnection.set("[email protected]:ioki-mobility/LokaliseGradlePlugin.git") | ||
connection.set("scm:git:git://github.com/ioki-mobility/LokaliseGradlePlugin.git") | ||
developerConnection.set("scm:git:ssh://[email protected]:ioki-mobility/LokaliseGradlePlugin.git") | ||
} | ||
} | ||
} | ||
} | ||
repositories { | ||
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/") { | ||
name = "SonatypeSnapshot" | ||
credentials { | ||
username = System.getenv("SONATYPE_USER") | ||
password = System.getenv("SONATYPE_PASSWORD") | ||
} | ||
} | ||
maven("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") { | ||
name = "SonatypeStaging" | ||
credentials { | ||
username = System.getenv("SONATYPE_USER") | ||
password = System.getenv("SONATYPE_PASSWORD") | ||
} | ||
} | ||
} | ||
} | ||
|
||
tasks.test { | ||
useJUnitPlatform() | ||
} | ||
|
||
kotlin.jvmToolchain(8) | ||
|
||
signing { | ||
val signingKey = System.getenv("GPG_SIGNING_KEY") | ||
val signingPassword = System.getenv("GPG_SIGNING_PASSWORD") | ||
useInMemoryPgpKeys(signingKey, signingPassword) | ||
sign(publishing.publications) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters