Skip to content

Commit da1786a

Browse files
committed
build: enable publishing
1 parent b32e867 commit da1786a

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

build.gradle.kts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
33

44
plugins {
55
kotlin("jvm") version "2.0.10"
6+
`maven-publish`
67
}
78

89
group = "dev.silenium.libs.flow-graph"
@@ -46,3 +47,25 @@ tasks.compileTestKotlin {
4647
kotlin {
4748
jvmToolchain(8)
4849
}
50+
51+
java {
52+
withSourcesJar()
53+
}
54+
55+
publishing {
56+
publications {
57+
create<MavenPublication>("mavenJava") {
58+
from(components["java"])
59+
}
60+
}
61+
repositories {
62+
val url = System.getenv("MAVEN_REPO_URL") ?: return@repositories
63+
maven(url) {
64+
name = "reposilite"
65+
credentials {
66+
username = System.getenv("MAVEN_REPO_USERNAME") ?: ""
67+
password = System.getenv("MAVEN_REPO_PASSWORD") ?: ""
68+
}
69+
}
70+
}
71+
}

0 commit comments

Comments
 (0)