ikej
02/15/2017, 9:02 PMval publishing: NamedDomainObjectContainer<Publication> by extensions
publishing {
"Module"(MavenPublication::class) {
// more code here
}
}
but I get this error:
Element 'publishing' of type 'org.gradle.api.publish.internal.DefaultPublishingExtension_Decorated' from container 'org.gradle.api.internal.plugins.DefaultConvention@260e45a' cannot be cast to 'org.gradle.api.NamedDomainObjectContainer'
Am I doing something wrong, or is this not supported yet?val publishing : NamedDomainObjectContainer<Publication> = the<PublishingExtension>().publications
bamboo
02/16/2017, 11:47 AMPublishingExtension
so the following should give you access to it:
val publishing: PublishingExtension by extensions
ikej
02/16/2017, 3:20 PMpublishing
so I have to write two lines
`
val publishing: PublishingExtension by extensions
val publications: NamedDomainObjectContainer<Publication> = publishing.publications
in that case.bamboo
02/16/2017, 3:49 PMapply
as in publishing.apply { …
but there’s nothing wrong with your solutionpublications
val thoughikej
02/16/2017, 3:56 PM