Skip to content

Commit 5b98970

Browse files
committed
Publish using publisher
1 parent ca20380 commit 5b98970

File tree

3 files changed

+11
-38
lines changed

3 files changed

+11
-38
lines changed

build.gradle.kts

Lines changed: 3 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import net.ltgt.gradle.errorprone.errorprone
33

44
plugins {
55
id("java-library")
6-
id("maven-publish")
76
alias(libs.plugins.indra)
87
alias(libs.plugins.indra.checkstyle)
98
alias(libs.plugins.blossom)
109
alias(libs.plugins.errorprone)
10+
alias(libs.plugins.publisher)
1111
}
1212

1313
repositories {
@@ -35,43 +35,8 @@ indra {
3535
checkstyle(libs.versions.checkstyle.get())
3636
}
3737

38-
publishing {
39-
publications {
40-
create<MavenPublication>("maven") {
41-
from(components["java"])
42-
pom {
43-
name = project.name
44-
url = "https://github.com/Siebrenvde/ntfy-java"
45-
licenses {
46-
license {
47-
name = "The MIT License"
48-
url = "https://opensource.org/licenses/MIT"
49-
}
50-
}
51-
developers {
52-
developer {
53-
id = "siebrenvde"
54-
name = "Siebrenvde"
55-
email = "siebren@siebrenvde.dev"
56-
url = "https://siebrenvde.dev"
57-
timezone = "Europe/Brussels"
58-
}
59-
}
60-
scm {
61-
connection = "scm:git:https://github.com/Siebrenvde/ntfy-java.git"
62-
developerConnection = "scm:git:ssh://git@github.com/Siebrenvde/ntfy-java.git"
63-
url = "https://github.com/Siebrenvde/ntfy-java"
64-
}
65-
}
66-
}
67-
68-
repositories.maven {
69-
val repo = if (version.toString().endsWith("-SNAPSHOT")) "snapshots" else "releases"
70-
url = uri("https://repo.siebrenvde.dev/${repo}/")
71-
name = "siebrenvde"
72-
credentials(PasswordCredentials::class)
73-
}
74-
}
38+
publisher {
39+
github("Siebrenvde", "ntfy-java")
7540
}
7641

7742
tasks.javadoc.configure {

gradle/libs.versions.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ indra = { id = "net.kyori.indra", version.ref = "indra" }
2525
indra-checkstyle = { id = "net.kyori.indra.checkstyle", version.ref = "indra" }
2626
blossom = { id = "net.kyori.blossom", version = "2.2.0" }
2727
errorprone = { id = "net.ltgt.errorprone", version = "4.4.0" }
28+
publisher = { id = "dev.siebrenvde.publisher", version = "1.0.0" }

settings.gradle.kts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
pluginManagement {
2+
repositories {
3+
gradlePluginPortal()
4+
maven("https://repo.siebrenvde.dev/releases/")
5+
}
6+
}
7+
18
plugins {
29
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
310
}

0 commit comments

Comments
 (0)