Replies: 5 comments 1 reply
-
Option 1 is a non-starter for me, it would mess up our git history and make merging and maintaining older branches a nightmare |
Beta Was this translation helpful? Give feedback.
-
It seems to me Option 1 is rather painful for the long term, indefinitely. I agree with @graemerocher that it's a scary thing to confront. Option 2 is just somewhat painful in the short term, but should have no lingering negative effects. I can help unbreak modules as we update them to new versions of the build plugins. I'm used to it now. ;) |
Beta Was this translation helpful? Give feedback.
-
Can we use this to fix it using some scripts?
|
Beta Was this translation helpful? Give feedback.
-
I would like to delay anything about this change until 4.0.0-M1 is released. We are still struggling to get every module building. I would also go for option 2. But: Could we add logic so that projects starting with Moreover, could the build tool make this optin, not automatically enabled, for modules. For example, to get project renaming working you have to do in gradle.properties or in another place micronaut.builld.projectrename=true |
Beta Was this translation helpful? Give feedback.
-
@melix I am going to close this discussion. I think we have a good solution in place. |
Beta Was this translation helpful? Give feedback.
-
Currently, the project templates use a layout like this one:
and the internal build plugins make it so that when the projects are published, the GAV coordinates of the different modules are determined from the
projectGroup
property found ingradle.properties
, and the project name, prepended bymicronaut
. For example, we would publishio.micronaut.foo:micronaut-foo-bom
,io.micronaut.foo:micronaut-foo-core
,io.micronaut.foo:micronaut-client
andio.micronaut.foo:micronaut-foo-fighters
in the example above (granted that each of those projects apply the internal Micronaut publishing plugin).While this has work for years, it has a major drawback: this breaks Gradle composite builds. Gradle is not capable of realizing that when a project depends on, say
io.micronaut:micronaut-core
, then it should substitute it with the local version of Micronaut core that we use. Not being able to use composite builds has a number of issues:mavenLocal()
as a repository on the consumer, which is not always obvious to do (there can be multple places to do this)To make this work, we have to rely on arcane invocations like the one described in our wiki. Even so, this doesn't always work.
Therefore, the proposal is to change the project names so that they are directly
micronaut-foo-core
andmicronaut-foo-client
, ... instead of "remapping" them.There are several ways to do this, each of them having the drawback that instead of executing a command line like:
./gradlew :data-core:test
you would have to invoke:
./gradlew :micronaut-data-core:test
which is longer, but can be simplified to
./gradlew :m-d-c:test
We would also likely lose our test distribution history (but it would relearn) in Gradle Enterprise.
More annoyingly, all project dependencies will have to be rewritten. For projects which use stringly-typed project dependencies, you'd change from:
implementation project(":foo-core")
to
implementation project(":micronaut-foo-core")
And for projects which use type-safe project accessors from:
to:
Then we have those options:
micronaut-foo-core
vstest-suite-core
)micronaut-build
otherwise projects would be published with artifact idmicronaut-micronaut-foo-core
micronaut-build
so that project names are remapped automaticallytest-suite
will becomemicronaut-test-suite
)because of the project dependencies being different
Note that whatever option is selected, there could be implementation difficulties which would prevent us from doing it altogether, but I need to have the option the @micronaut-projects/core-developers prefer.
4 votes ·
Beta Was this translation helpful? Give feedback.
All reactions