Skip to content

Commit

Permalink
Add step with publishing packages to GitHub into build script. Fix #8
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-punko committed Oct 28, 2024
1 parent 343d66d commit 2e20b79
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
19 changes: 19 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id 'java'
id 'jacoco'
id("maven-publish")
}

group = 'by.andd3dfx'
Expand Down Expand Up @@ -58,3 +59,21 @@ jacocoTestReport {
}))
}
}

publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/andrei-punko/pde-solvers")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("USERNAME")
password = project.findProperty("gpr.key") ?: System.getenv("TOKEN")
}
}
}
publications {
gpr(MavenPublication) {
from(components.java)
}
}
}
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
lombokVersion = 1.18.34
gpr.user = GITHUB_USERNAME
gpr.key = GITHUB_TOKEN

0 comments on commit 2e20b79

Please sign in to comment.