Skip to content

Commit d7381c4

Browse files
authored
Merge pull request #193 from teogor/release/v1.0.0-alpha05
Release 1.0.0-alpha05
2 parents 72461d4 + eed3dc5 commit d7381c4

File tree

27 files changed

+853
-84
lines changed

27 files changed

+853
-84
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,6 @@ jobs:
150150
else
151151
for module in "${modules_to_publish[@]}"; do
152152
echo "Publishing $module module..."
153-
./gradlew ":${module}:publish" --no-configuration-cache
153+
./gradlew publishModule -PmoduleName="${module}" --no-configuration-cache
154154
done
155155
fi

bom/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ winds {
2828
artifactDescriptor {
2929
name = "BoM"
3030
version = createVersion(1, 0, 0) {
31-
alphaRelease(4)
31+
alphaRelease(5)
3232
}
3333
artifactIdFormat = ArtifactIdFormat.NAME_ONLY
3434
}

build.gradle.kts

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,58 @@ tasks.dokkaHtmlMultiModule {
232232
}
233233
}
234234

235+
childProjects.values.filter {
236+
it.name != "app" && it.name != "bom"
237+
}.forEach { subproject ->
238+
val name = subproject.name[0].uppercaseChar() + subproject.name.substring(1)
239+
tasks.register("publish${name}Module") {
240+
group = "publishing"
241+
description = "Publishes artifacts from the specified subproject."
242+
243+
subproject.subprojects.forEach { sp ->
244+
sp.tasks.findByName("publish")?.let { task ->
245+
dependsOn(task)
246+
}
247+
}
248+
}
249+
}
250+
251+
abstract class PublishModuleTask : DefaultTask() {
252+
253+
@get:Input
254+
abstract val moduleName: Property<String>
255+
256+
private val childProjects = project.childProjects.values.filter {
257+
it.name != "app" && it.name != "bom"
258+
}
259+
260+
@TaskAction
261+
fun publish() {
262+
println("Published module: ${moduleName.get()}")
263+
}
264+
265+
fun configureDependencies() {
266+
childProjects.firstOrNull {
267+
it.name == moduleName.get()
268+
}?.let { subproject ->
269+
// Handle scenarios where subproject might have subprojects (nested modules)
270+
subproject.subprojects.forEach { childProject ->
271+
childProject.tasks.findByName("publish")?.let { childPublishTask ->
272+
dependsOn(childPublishTask) // Depend on child publish tasks
273+
}
274+
}
275+
}
276+
}
277+
}
278+
279+
tasks.register("publishModule", PublishModuleTask::class) {
280+
group = "publishing"
281+
description = "Publishes artifacts from a specified module."
282+
moduleName = project.findProperty("moduleName") as String? ?: ""
283+
284+
configureDependencies()
285+
}
286+
235287
versionCatalogUpdate {
236288
keep {
237289
// keep versions without any library or plugin reference

core/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ winds {
2525
artifactDescriptor {
2626
name = "Core"
2727
version = createVersion(1, 0, 0) {
28-
alphaRelease(4)
28+
alphaRelease(5)
2929
}
3030
}
3131
}

0 commit comments

Comments
 (0)