|
| 1 | +import org.jreleaser.model.Active |
| 2 | + |
1 | 3 | plugins {
|
2 | 4 | alias(libs.plugins.android.library)
|
3 | 5 | alias(libs.plugins.kotlin.android)
|
4 | 6 | alias(libs.plugins.kotlin.compose)
|
| 7 | + alias(libs.plugins.jreleaser) |
5 | 8 | alias(libs.plugins.maven.publish)
|
6 | 9 | }
|
7 | 10 |
|
@@ -32,6 +35,7 @@ android {
|
32 | 35 | publishing {
|
33 | 36 | singleVariant("release") {
|
34 | 37 | withSourcesJar()
|
| 38 | + withJavadocJar() |
35 | 39 | }
|
36 | 40 | }
|
37 | 41 | }
|
@@ -60,15 +64,93 @@ dependencies {
|
60 | 64 | implementation(libs.okhttp)
|
61 | 65 | }
|
62 | 66 |
|
| 67 | +version = "1.0.0" |
| 68 | + |
63 | 69 | publishing {
|
64 | 70 | 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 | +} |
69 | 118 |
|
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 | + } |
72 | 154 | }
|
73 | 155 | }
|
74 | 156 | }
|
|
0 commit comments