Skip to content

Commit 1ebcf76

Browse files
committedFeb 26, 2025
Moved publishing to MavenCentral from JitPack
1 parent 5d563db commit 1ebcf76

File tree

4 files changed

+91
-8
lines changed

4 files changed

+91
-8
lines changed
 

‎build.gradle.kts

+1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ plugins {
44
alias(libs.plugins.kotlin.android) apply false
55
alias(libs.plugins.kotlin.compose) apply false
66
alias(libs.plugins.android.library) apply false
7+
alias(libs.plugins.jreleaser) apply false
78
}

‎gradle/libs.versions.toml

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ activityCompose = "1.10.0"
1111
composeBom = "2025.02.00"
1212
okhttp = "4.12.0"
1313
retrofit = "2.9.0"
14+
jreleaser = "1.16.0"
1415

1516
[libraries]
1617
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
@@ -36,5 +37,6 @@ android-application = { id = "com.android.application", version.ref = "agp" }
3637
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
3738
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
3839
android-library = { id = "com.android.library", version.ref = "agp" }
40+
jreleaser = { id = "org.jreleaser", version.ref = "jreleaser" }
3941
maven-publish = { id = "maven-publish" }
4042

‎jitpack.yml

-2
This file was deleted.

‎materialize/build.gradle.kts

+88-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
import org.jreleaser.model.Active
2+
13
plugins {
24
alias(libs.plugins.android.library)
35
alias(libs.plugins.kotlin.android)
46
alias(libs.plugins.kotlin.compose)
7+
alias(libs.plugins.jreleaser)
58
alias(libs.plugins.maven.publish)
69
}
710

@@ -32,6 +35,7 @@ android {
3235
publishing {
3336
singleVariant("release") {
3437
withSourcesJar()
38+
withJavadocJar()
3539
}
3640
}
3741
}
@@ -60,15 +64,93 @@ dependencies {
6064
implementation(libs.okhttp)
6165
}
6266

67+
version = "1.0.0"
68+
6369
publishing {
6470
publications {
65-
register<MavenPublication>("release") {
66-
groupId = "arcanegolem"
67-
artifactId = "Materialize"
68-
version = "1.0.0"
71+
create<MavenPublication>("release") {
72+
groupId = "io.github.arcanegolem"
73+
artifactId = "materialize"
74+
75+
pom {
76+
name.set("materialize")
77+
description.set("")
78+
url.set("https://github.com/arcanegolem/Materialize")
79+
issueManagement {
80+
url.set("https://github.com/arcanegolem/Materialize/issues")
81+
}
82+
83+
scm {
84+
url.set("https://github.com/arcanegolem/Materialize")
85+
connection.set("scm:git://github.com/arcanegolem/Materialize.git")
86+
developerConnection.set("scm:git://github.com/arcanegolem/Materialize.git")
87+
}
88+
89+
licenses {
90+
license {
91+
name.set("MIT License")
92+
url.set("https://github.com/arcanegolem/Materialize/blob/master/LICENSE")
93+
distribution.set("repo")
94+
}
95+
}
96+
97+
developers {
98+
developer {
99+
id.set("arcanegolem")
100+
name.set("Mikhail Kleyzer")
101+
email.set("dopeflipper@gmail.com")
102+
url.set("")
103+
}
104+
}
105+
106+
afterEvaluate {
107+
from(components["release"])
108+
}
109+
}
110+
}
111+
}
112+
repositories {
113+
maven {
114+
setUrl(layout.buildDirectory.dir("staging-deploy"))
115+
}
116+
}
117+
}
69118

70-
afterEvaluate {
71-
from(components["release"])
119+
jreleaser {
120+
jreleaser {
121+
project {
122+
inceptionYear = "2025"
123+
author("@arcanegolem")
124+
}
125+
gitRootSearch = true
126+
signing {
127+
active = Active.ALWAYS
128+
armored = true
129+
verify = true
130+
}
131+
release {
132+
github {
133+
skipTag = true
134+
sign = true
135+
branch = "master"
136+
branchPush = "master"
137+
overwrite = true
138+
}
139+
}
140+
deploy {
141+
maven {
142+
mavenCentral.create("sonatype") {
143+
active = Active.ALWAYS
144+
url = "https://central.sonatype.com/api/v1/publisher"
145+
stagingRepository(layout.buildDirectory.dir("staging-deploy").get().toString())
146+
setAuthorization("Basic")
147+
applyMavenCentralRules = false
148+
sign = true
149+
checksums = true
150+
sourceJar = true
151+
javadocJar = true
152+
retryDelay = 60
153+
}
72154
}
73155
}
74156
}

0 commit comments

Comments
 (0)
Please sign in to comment.