-
Notifications
You must be signed in to change notification settings - Fork 274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing extension functions for Kotlin DSL #309
Comments
I’ll take a look into this later today. |
I was unable to reproduce this issue using the example project in master, gradle I left type hints enabled to show that all types still resolved correctly. My best guess is that the original reporter had conflicting imports in their build script. Specifically some other function named Since we are only using We would need to
Marking the existing Proposed change. private fun <T : Any> NamedDomainObjectContainerScope<T>.id(id: String, action: (T.() -> Unit)? = null) {
action?.let { create(id, closureOf(it)) }
?: create(id)
}
@JvmName("executableLocatorId")
fun NamedDomainObjectContainerScope<ExecutableLocator>.id(
id: String,
action: (ExecutableLocator.() -> Unit)? = null
) {
id<ExecutableLocator>(id,action)
}
@JvmName("pluginOptionsId")
fun NamedDomainObjectContainerScope<GenerateProtoTask.PluginOptions>.id(
id: String,
action: (GenerateProtoTask.PluginOptions.() -> Unit)? = null
) {
id<GenerateProtoTask.PluginOptions>(id,action)
} @zhangkun83 If we want to try to limit issues with conflicting imports I can submit the PR for this change. |
Thank you @marcoferrer! Please go ahead with the PR. |
I can reproduce this issue by removing the |
use Groovy DSL also has similar issue.
When I specified the specific package info, it worked well. Seems this plugin doesn't support 'Sharing dependency versions between projects'?
|
Reported by @alexvas in #275:
As of plugin version of 0.8.8 I still need a pair of auxiliary functions:
to make
work. Otherwise there is a gradle configuration error:
using Gradle 5.2.1
The text was updated successfully, but these errors were encountered: