|
1 | 1 | import org.jetbrains.kotlin.gradle.dsl.JvmTarget |
2 | 2 | import org.jreleaser.model.Active |
| 3 | +import java.time.LocalDate |
3 | 4 |
|
4 | 5 | plugins { |
5 | 6 | kotlin("jvm") version libs.versions.kotlin.get() apply false |
6 | 7 | kotlin("plugin.spring") version libs.versions.kotlin.get() apply false |
7 | 8 | id("java-library") |
8 | | - alias(libs.plugins.jreleaser) apply false |
| 9 | + alias(libs.plugins.jreleaser) // Apply JReleaser at the root level |
9 | 10 | } |
10 | 11 |
|
11 | 12 | allprojects { |
12 | 13 | group = "pl.brightinventions.spring.modulith" |
13 | | - version = "0.1.6" |
| 14 | + version = "0.2.1" |
14 | 15 |
|
15 | 16 | repositories { |
16 | 17 | mavenCentral() |
@@ -39,8 +40,6 @@ subprojects { |
39 | 40 | } |
40 | 41 |
|
41 | 42 | if (project.name != "examples") { |
42 | | - apply(plugin = "org.jreleaser") |
43 | | - |
44 | 43 | java { |
45 | 44 | withJavadocJar() |
46 | 45 | withSourcesJar() |
@@ -82,53 +81,51 @@ subprojects { |
82 | 81 | } |
83 | 82 | } |
84 | 83 | } |
85 | | - val gradleProject = project |
86 | | - configure<org.jreleaser.gradle.plugin.JReleaserExtension> { |
87 | | - gitRootSearch = true |
88 | | - project { |
89 | | - description = gradleProject.description ?: gradleProject.name |
90 | | - authors = listOf("Bright Inventions") |
91 | | - license = "MIT" |
92 | | - links { |
93 | | - homepage = "https://github.com/bright/spring-modulith-gcp" |
94 | | - bugTracker = "https://github.com/bright/spring-modulith-gcp/issues" |
95 | | - contact = "https://brightinventions.pl" |
96 | | - } |
97 | | - inceptionYear = "2025" |
98 | | - vendor = "Bright Inventions" |
99 | | - copyright = "" |
100 | | - } |
| 84 | + } |
| 85 | +} |
101 | 86 |
|
102 | | - release { |
103 | | - github { |
104 | | - commitAuthor { |
105 | | - name = "Bright Inventions" |
106 | | - |
107 | | - } |
108 | | - } |
109 | | - } |
| 87 | +configure<org.jreleaser.gradle.plugin.JReleaserExtension> { |
| 88 | + gitRootSearch = true |
| 89 | + project { |
| 90 | + description = "Spring Modulith GCP integration libraries" |
| 91 | + authors = listOf("Bright Inventions") |
| 92 | + license = "MIT" |
| 93 | + links { |
| 94 | + homepage = "https://github.com/bright/spring-modulith-gcp" |
| 95 | + bugTracker = "https://github.com/bright/spring-modulith-gcp/issues" |
| 96 | + contact = "https://brightinventions.pl" |
| 97 | + } |
| 98 | + inceptionYear = "2025" |
| 99 | + vendor = "Bright Inventions" |
| 100 | + copyright = "Copyright (c) ${LocalDate.now().year} Bright Inventions Sp. z o.o." |
| 101 | + } |
110 | 102 |
|
111 | | - checksum { |
112 | | - individual = true // Generate checksums for each file |
| 103 | + release { |
| 104 | + github { |
| 105 | + commitAuthor { |
| 106 | + name = "Bright Inventions" |
| 107 | + |
113 | 108 | } |
| 109 | + } |
| 110 | + } |
114 | 111 |
|
115 | | - signing { |
116 | | - active = Active.ALWAYS |
117 | | - armored = true |
118 | | - } |
| 112 | + signing { |
| 113 | + active = Active.ALWAYS |
| 114 | + armored = true |
| 115 | + } |
119 | 116 |
|
120 | | - deploy { |
121 | | - maven { |
122 | | - mavenCentral { |
123 | | - register("sonatype") { // https://jreleaser.org/guide/latest/examples/maven/maven-central.html#_portal_publisher_api |
124 | | - active = Active.ALWAYS |
125 | | - url = "https://central.sonatype.com/api/v1/publisher" |
126 | | - stagingRepository(layout.buildDirectory.dir("staging-deploy").get().asFile.path) |
127 | | - } |
| 117 | + deploy { |
| 118 | + maven { |
| 119 | + mavenCentral { |
| 120 | + register("sonatype") { // https://jreleaser.org/guide/latest/examples/maven/maven-central.html#_portal_publisher_api |
| 121 | + active = Active.ALWAYS |
| 122 | + url = "https://central.sonatype.com/api/v1/publisher" |
| 123 | + subprojects.filter { it.name != "examples" }.forEach { project -> |
| 124 | + stagingRepository(project.layout.buildDirectory.dir("staging-deploy").get().asFile.path) |
128 | 125 | } |
| 126 | + |
129 | 127 | } |
130 | 128 | } |
131 | | - |
132 | 129 | } |
133 | 130 | } |
134 | 131 | } |
0 commit comments