Because I did not receive any feedback yet I also syndicated this question on Stackoverflow: “Gradle 5 Kotlin DSL: Howto declare common Tasks & Maven Artifacts for submodules in a multi-module Java library”.
Publishing is not working after the upgrade to 5.0 seems to have a very related issue in the same area, too.