-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from samtkit/publish-to-maven
Publish to maven
- Loading branch information
Showing
37 changed files
with
195 additions
and
68 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
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] | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: temurin | ||
java-version: 17 | ||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
|
||
- name: Publish Snapshot to Sonatype OSSRH | ||
run: ./gradlew --no-daemon publishMavenPublicationToOSSRHRepository | ||
env: | ||
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | ||
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} |
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 |
---|---|---|
|
@@ -22,4 +22,4 @@ repositories { | |
mavenCentral() | ||
} | ||
|
||
group = "samt-core" | ||
group = "tools.samt" |
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,76 @@ | ||
plugins { | ||
id("samt-core.kotlin-jvm") | ||
`java-library` | ||
`maven-publish` | ||
signing | ||
} | ||
|
||
val mavenName: String by project.extra | ||
val mavenDescription: String by project.extra | ||
|
||
publishing { | ||
publications { | ||
create<MavenPublication>("maven") { | ||
pom { | ||
name.set(provider { mavenName }) | ||
description.set(provider { mavenDescription }) | ||
url.set("https://github.com/samtkit/core") | ||
licenses { | ||
license { | ||
name.set("MIT License") | ||
url.set("https://github.com/samtkit/core/blob/main/LICENSE") | ||
} | ||
} | ||
developers { | ||
developer { | ||
name.set("Pascal Honegger") | ||
email.set("[email protected]") | ||
organization.set("Simple API Modeling Toolkit") | ||
organizationUrl.set("https://github.com/samtkit") | ||
} | ||
developer { | ||
name.set("Marcel Joss") | ||
email.set("[email protected]") | ||
organization.set("Simple API Modeling Toolkit") | ||
organizationUrl.set("https://github.com/samtkit") | ||
} | ||
developer { | ||
name.set("Leonard Schütz") | ||
email.set("[email protected]") | ||
organization.set("Simple API Modeling Toolkit") | ||
organizationUrl.set("https://github.com/samtkit") | ||
} | ||
} | ||
scm { | ||
connection.set("scm:git:git://github.com/samtkit/core.git") | ||
developerConnection.set("scm:git:ssh://github.com/samtkit/core.git") | ||
url.set("https://github.com/samtkit/core") | ||
} | ||
} | ||
from(components["java"]) | ||
} | ||
} | ||
|
||
repositories { | ||
maven { | ||
name = "OSSRH" | ||
url = if (version.toString().endsWith("-SNAPSHOT")) { | ||
uri("https://s01.oss.sonatype.org/content/repositories/snapshots/") | ||
} else { | ||
uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") | ||
} | ||
credentials { | ||
username = System.getenv("SONATYPE_USERNAME") | ||
password = System.getenv("SONATYPE_PASSWORD") | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
isRequired = !version.toString().endsWith("-SNAPSHOT") | ||
val signingKey: String? by project | ||
val signingPassword: String? by project | ||
useInMemoryPgpKeys(signingKey, signingPassword) | ||
sign(publishing.publications["maven"]) | ||
} |
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 |
---|---|---|
@@ -1,13 +1,15 @@ | ||
plugins { | ||
id("samt-core.kotlin-conventions") | ||
id("samt-core.kotlin-jvm") | ||
id("samt-core.library") | ||
alias(libs.plugins.kover) | ||
} | ||
|
||
val mavenName: String by extra("SAMT CodeGen") | ||
val mavenDescription: String by extra("Call SAMT plugins to generate code from SAMT files.") | ||
|
||
dependencies { | ||
implementation(project(":common")) | ||
implementation(project(":parser")) | ||
implementation(project(":semantic")) | ||
implementation(project(":public-api")) | ||
testImplementation(project(":lexer")) | ||
implementation(project(":compiler")) | ||
api(project(":public-api")) | ||
testImplementation(project(":samt-config")) | ||
} |
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 |
---|---|---|
@@ -1,4 +1,8 @@ | ||
plugins { | ||
id("samt-core.kotlin-conventions") | ||
id("samt-core.kotlin-jvm") | ||
id("samt-core.library") | ||
alias(libs.plugins.kover) | ||
} | ||
|
||
val mavenName: String by extra("SAMT Common") | ||
val mavenDescription: String by extra("Common SAMT module") |
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,13 @@ | ||
plugins { | ||
id("samt-core.kotlin-jvm") | ||
id("samt-core.library") | ||
alias(libs.plugins.kover) | ||
} | ||
|
||
val mavenName: String by extra("SAMT Compiler") | ||
val mavenDescription: String by extra("Parse, analyze, and do whatever you desire with SAMT files.") | ||
|
||
dependencies { | ||
implementation(kotlin("reflect")) | ||
implementation(project(":common")) | ||
} |
4 changes: 3 additions & 1 deletion
4
...src/main/kotlin/tools/samt/lexer/Lexer.kt → ...src/main/kotlin/tools/samt/lexer/Lexer.kt
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 3 additions & 1 deletion
4
...ain/kotlin/tools/samt/semantic/Package.kt → ...ain/kotlin/tools/samt/semantic/Package.kt
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
org.gradle.configuration-cache=true | ||
# Breaks with the current version of the gradle versioning plugin | ||
# org.gradle.configuration-cache=true |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,3 +1,7 @@ | ||
plugins { | ||
id("samt-core.kotlin-conventions") | ||
id("samt-core.kotlin-jvm") | ||
id("samt-core.library") | ||
} | ||
|
||
val mavenName: String by extra("SAMT Public API") | ||
val mavenDescription: String by extra("Public API for creating custom SAMT plugins.") |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.