allegro / allegro/axion-release-plugin

Issue with Tasks Not Found in Subproject in Multi-Project Setup

Open
#703 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Groovy
Stars
641
Forks
165
Avg merge
49m
Merged PRs (30d)
9

Description

I am experiencing an issue with the Axion release plugin in a multi-project Gradle setup. Despite configuring the plugin in the root project and setting up a monorepo configuration, tasks such as currentVersion is not being recognized in proja subproject.

**Here's what I did:**
Applied the Axion release plugin in the root project's build.gradle.kts.
Configured scmVersion in the root project for a monorepo setup.
Attempt to run ./gradlew :proja:currentVersion from the root directory.

**Expected Behavior:**
The currentVersion task should provide the current version of the proja subproject. Or I would at least expect running ./gradlew cV would show versions of all the configured subprojects alongside the root.
**Actual Behavior:**
The task currentVersion is not found in the proja subproject. The command ./gradlew :proja:currentVersion results in a "Task not found" error.

**Root Project Configuration (build.gradle.kts):**

```
buildscript {
repositories {
mavenCentral()
}
}

plugins {
id("pl.allegro.tech.build.axion-release") version "1.16.1"
}

scmVersion {
monorepo {
// exclude(project.subprojects.map { it.path })
include(listOf("proja"))
}
}
version = scmVersion.version

allprojects {
project.version = rootProject.version
}
```

Additionally, the settings.gradle.kts does include this sub-project. Also, I have tried other permutations and combinations too, such as adding the scmVersion block for the sub-project's gradle.build.kts but that still throws an error for being unrecognisable.
Not sure what I am missing.
Ideally I want a configuration where the root can handle which projects to include and exclude and also have the subprojects configurable to say which other sub projects to bump up and exclude. Thank you!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.