Davide Giuseppe Farella
07/21/2020, 12:46 PMmyLib
) and a Gradle plugin.
Plugin got myLib
as dependency and example
is using the Plugin, but I got
> Failed to apply plugin [id 'studio.forface.easy-publish']
> Could not create an instance of type studio.forface.easygradle.publish.EasyPublishExtension.
> Could not generate a decorated class for type EasyPublishExtension.
> studio/forface/easygradle/internal/ConfigReadWriteProperty
ConfigReadWriteProperty
is part of myLib
and EasyPublishExtension
is something like:
abstract class EasyPublishExtension @Inject constructor(project: Project) {
var username by project("", propertyName = "bintray.user")
private operator fun <T : Any> Project.invoke(
default: T,
propertyName: String? = null,
envName: String? = null
) = object : ConfigReadWriteProperty<EasyPublishExtension, T>(
....
}
What is the problem here?no
07/21/2020, 1:01 PMproject
from the extension constructor?Davide Giuseppe Farella
07/21/2020, 1:46 PMstudio/forface/easygradle/internal/ConfigReadWriteProperty
no
07/21/2020, 1:59 PMDavide Giuseppe Farella
07/21/2020, 2:34 PMDavide Giuseppe Farella
07/21/2020, 2:34 PMDavide Giuseppe Farella
07/21/2020, 2:36 PMno
07/21/2020, 2:43 PMno
07/21/2020, 2:49 PMDavide Giuseppe Farella
07/21/2020, 4:27 PMexample
no
07/21/2020, 4:57 PMDavide Giuseppe Farella
07/21/2020, 8:32 PMDavide Giuseppe Farella
07/21/2020, 8:32 PMno
07/22/2020, 6:45 AMDavide Giuseppe Farella
07/22/2020, 6:56 AMno
07/22/2020, 7:12 AMno
07/22/2020, 7:13 AMdsl
a part of the plugin module first and then try separating it laterno
07/22/2020, 7:13 AMDavide Giuseppe Farella
07/22/2020, 7:20 AMimplementation(project(":dsl"))
Is there any way to achieve that?
Also what's the difference in my structure? 🤔Davide Giuseppe Farella
07/22/2020, 7:22 AMno
07/22/2020, 7:23 AMDavide Giuseppe Farella
07/22/2020, 7:24 AMDavide Giuseppe Farella
07/22/2020, 7:26 AMyour example/sample is a composite build, whereas in Nicola's project it is a regular part of the build.
I did in that way just because I wanted to showcase also how to use
dsl
, by including it in its buildSrc.
But I think that's not a big issues, as I would use the plugin in a completely different project 🙂Davide Giuseppe Farella
07/22/2020, 8:35 PM