In a plugin of mine, I'd like to have the same `ma...
# plugin-development
g
In a plugin of mine, I'd like to have the same
maven
DSL of the publication task, so in my extension I simply wrote
Copy code
val maven = objects.newInstance<MavenArtifactRepository>()
fun maven(action: Action<in MavenArtifactRepository>) = action.execute(maven)
but I get: > Could not create an instance of type Library. > > Could not create an instance of type Library$Into. > > Could not create an instance of type org.gradle.api.artifacts.repositories.MavenArtifactRepository. > > Could not generate a decorated class for type MavenArtifactRepository. > > Cannot have abstract method AuthenticationSupported.getAuthentication(): AuthenticationContainer. Is there a way to achieve that?
v
Probably only by using internal class, or yourself developing a subclass that implements the methods Gradle cannot decorate into
g
Pity, thanks though