Skip to content

Commit

Permalink
Publishing to github
Browse files Browse the repository at this point in the history
  • Loading branch information
smirnovegorv committed Oct 24, 2024
1 parent 771327e commit d23bb1d
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
id("java")
id("maven-publish")
kotlin("jvm")
}

Expand All @@ -10,6 +11,9 @@ repositories {
mavenCentral()
}

val githubUser = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME")
val githubPass = project.findProperty("gpr.key") as String? ?: System.getenv("TOKEN")

dependencies {
api("org.locationtech.jts:jts-core:1.19.0")

Expand All @@ -28,4 +32,23 @@ tasks.test {
}
kotlin {
jvmToolchain(17)
}

publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/Urban-Research-Lab/jts-geojson")
credentials {
username = githubUser
password = githubPass
}
}
}

publications {
create<MavenPublication>("maven") {
from(components["java"])
}
}
}

0 comments on commit d23bb1d

Please sign in to comment.