Help on maven-publish

while started to upgrade gradle 8.6 got the below errors.
gradlew clean is fine
gradlew build is fine
gradlew publish is giving the following errors

------------------------------------------------------
FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':modA:publishXYZPublicationTopublicRepository' (type 'PublishToMavenRepository').
  - Gradle detected a problem with the following location: 'C:\Users\modA\modAXLL\Release\component.xll'.
    
    Reason: Task ':modA:publishXYZPublicationTopublicRepository' uses this output of task ':modA:make_XLL' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
    
    Possible solutions:
      1. Declare task ':modA:make_XLL' as an input of ':modA:publishXYZPublicationTopublicRepository'.
      2. Declare an explicit dependency on ':modA:make_XLL' from ':modA:publishXYZPublicationTopublicRepository' using Task#dependsOn.
      3. Declare an explicit dependency on ':modA:make_XLL' from ':modA:publishXYZPublicationTopublicRepository' using Task#mustRunAfter.
    
    For more information, please refer to https://docs.gradle.org/8.6/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.
------------------------------------------------------

Since the task publishPubNamePublicationToRepoNameRepository is added by the maven-publish plugin how can i enforce the task :modA:make_XLL as dependent ?

Any help/inputs/suggestions are welcome…
~RC

Actually, following the possible solutions of this finding is most often the wrong thing to do.
In most cases, this is a sign that you did something else majorly wrong.
This could for example be that make_XLL writes into the output directory of another task and the “task that uses those outputs” is configured to use the outputs of that other task.
Or it could for example be that you somewhere configured the path to the outputs of make_XLL hard-coded instead of properly wiring task outputs to inputs.

What exactly is the problem in your specific case is very hard to tell without seeing your build.