@@ -7,6 +7,7 @@ plugins {
77 kotlin(" plugin.serialization" ) version " 2.3.10" apply false
88 id(" org.jetbrains.dokka" ) version " 2.1.0"
99 id(" org.jetbrains.dokka-javadoc" ) version " 2.1.0"
10+ id(" maven-publish" )
1011}
1112
1213subprojects {
@@ -20,6 +21,7 @@ subprojects {
2021 apply (plugin = kotlin(" plugin.serialization" ))
2122 apply (plugin = " org.jetbrains.dokka" )
2223 apply (plugin = " org.jetbrains.dokka-javadoc" )
24+ apply (plugin = " maven-publish" )
2325
2426 kotlin {
2527 compilerOptions.allWarningsAsErrors = true
@@ -50,6 +52,51 @@ subprojects {
5052 tasks.named<Jar >(" javadocJar" ) {
5153 from(tasks.dokkaGeneratePublicationJavadoc.flatMap { it.outputDirectory })
5254 }
55+
56+ configure<PublishingExtension > {
57+ publications {
58+ create<MavenPublication >(" maven" ) {
59+ from(components[" java" ])
60+
61+ pom {
62+ name.set(project.name)
63+ description.set(" TypedRest helps you build type-safe, fluent-style REST API clients." )
64+ url.set(" https://typedrest.net/" )
65+
66+ licenses {
67+ license {
68+ name.set(" MIT License" )
69+ url.set(" https://opensource.org/licenses/MIT" )
70+ }
71+ }
72+
73+ developers {
74+ developer {
75+ name.set(" Bastian Eicher" )
76+ url.set(" https://github.com/bastianeicher" )
77+ }
78+ }
79+
80+ scm {
81+ connection.set(" scm:git:https://github.com/TypedRest/TypedRest-Java.git" )
82+ developerConnection.set(" scm:git:git@github.com:TypedRest/TypedRest-Java.git" )
83+ url.set(" https://github.com/TypedRest/TypedRest-Java" )
84+ }
85+ }
86+ }
87+ }
88+
89+ repositories {
90+ maven {
91+ name = " GitHub"
92+ url = uri(" https://maven.pkg.github.com/TypedRest/TypedRest-Java" )
93+ credentials {
94+ username = System .getenv(" GITHUB_ACTOR" )
95+ password = System .getenv(" GITHUB_TOKEN" )
96+ }
97+ }
98+ }
99+ }
53100}
54101
55102dependencies {
0 commit comments