Skip to content

Commit

Permalink
fix(build): setup gradle publishing
Browse files Browse the repository at this point in the history
Publishing has to be defined to ensure the jar can be published to the github maven repository.
  • Loading branch information
bas-info-nl authored Sep 1, 2024
1 parent 3a26109 commit c835d39
Showing 1 changed file with 19 additions and 10 deletions.
29 changes: 19 additions & 10 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import java.net.URI

/*
* SPDX-FileCopyrightText: 2024 INFO
* SPDX-License-Identifier: EUPL-1.2+
*/
import java.net.URI

plugins {
java
Expand All @@ -16,14 +15,6 @@ plugins {
repositories {
mavenLocal()
mavenCentral()
maven {
name = "GitHubPackages"
url = URI("https://maven.pkg.github.com/infonl/stadsbank")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}

sourceSets {
Expand All @@ -37,6 +28,24 @@ sourceSets {
group = "nl.amsterdam.stadsbank"
description = "SEPA client library for Stadsbank van Lening Amsterdam"

publishing {
publications {
create<MavenPublication>("Jar") {
from(components["java"])
}
}
repositories {
maven {
name = "GitHub"
url = URI("https://maven.pkg.github.com/infonl/stadsbank")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}

val javaVersion = JavaVersion.VERSION_21

dependencies {
Expand Down

0 comments on commit c835d39

Please sign in to comment.