Skip to content

Commit 2a1c975

Browse files
committed
Fibonacci deploy 3
1 parent 3d18714 commit 2a1c975

File tree

2 files changed

+40
-1
lines changed

2 files changed

+40
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ jobs:
4646
java-version: '17'
4747
distribution: 'temurin'
4848
- name: Publish to Maven Central
49-
run: ./gradlew publish --no-configuration-cache
49+
run: ./gradlew publishAllPublicationsToMavenCentralRepository --no-configuration-cache

fibonacci/build.gradle.kts

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import com.vanniktech.maven.publish.SonatypeHost
22
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
33
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
44

5+
56
group = "io.github.pahill"
67
version = "1.0.3"
78

@@ -46,3 +47,41 @@ android {
4647
minSdk = libs.versions.android.minSdk.get().toInt()
4748
}
4849
}
50+
51+
mavenPublishing {
52+
publishToMavenCentral(SonatypeHost.DEFAULT)
53+
// or when publishing to https://s01.oss.sonatype.org
54+
publishToMavenCentral(SonatypeHost.S01)
55+
// or when publishing to https://central.sonatype.com/
56+
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
57+
58+
signAllPublications()
59+
60+
coordinates("io.github.pahill", "mylibrary-fibonacci", "1.0.3")
61+
62+
pom {
63+
name.set("Fibonacci library")
64+
description.set("A description of what my library does.")
65+
inceptionYear.set("2024")
66+
url.set("https://github.com/pahill/fibonacci/")
67+
licenses {
68+
license {
69+
name.set("The Apache License, Version 2.0")
70+
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
71+
distribution.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
72+
}
73+
}
74+
developers {
75+
developer {
76+
id.set("pahill")
77+
name.set("Pamela Hill")
78+
url.set("https://github.com/pahill/")
79+
}
80+
}
81+
scm {
82+
url.set("https://github.com/pahill/fibonacci/")
83+
connection.set("scm:git:git://github.com/pahill/fibonacci.git")
84+
developerConnection.set("scm:git:ssh://[email protected]/pahill/fibonacci.git")
85+
}
86+
}
87+
}

0 commit comments

Comments
 (0)