vanniktech / gradle-maven-publish-plugin

A Gradle plugin that publishes your Android and Kotlin libraries, including sources and javadoc, to Maven Central or any other Nexus instance.
https://vanniktech.github.io/gradle-maven-publish-plugin
Apache License 2.0
1.26k stars 116 forks source link

Less agressive Kotlin version checks #820

Open vendelieu opened 1 month ago

vendelieu commented 1 month ago

Hello,

Firstly, I want to express my gratitude to you all for creating such a useful plugin!

However, I encountered an issue due to the method your Kotlin minimum version check. Specifically, I am implementing a compact publishing logic within buildSrc for reuse purposes.

Nonetheless, owing to this particular check, I received the following error: image

My assumption is that this occurs because, within buildSrc the sources are not being provided, because below there's such remark: e: Please initialize at least one Kotlin target in 'project-name (:project)'.

vendelieu commented 1 month ago

For those who have encountered a similar problem and can't find a solution, it may not be obvious but you need to add a kotlin gradle plugin:

org.jetbrains.kotlin:kotlin-gradle-plugin

The original issue was more about finding a different solution, not sure but it seems like gradle gives project.pluginVersion() or something like, maybe other solutions as well.