Slackbot
07/20/2023, 10:21 AMJavi
07/20/2023, 10:27 AMPiotr Minkina
07/20/2023, 10:36 AMString name by NamedDomainObjectContainer, like below:
project.objects.newInstance(
DockerComposeRunSettings,
name
)twisterrob
07/20/2023, 10:55 AMnewInstance is in a factory):
We have `abstract class NexusRepository @Inject constructor(@Input val name: String) { ... bunch of other properties`, I just tried without @Inject and all the tests pass on Gradle 8.2.1.twisterrob
07/20/2023, 11:00 AMPiotr Minkina
07/20/2023, 11:19 AMproject.objects.newInstance requires @Inject. Thanks for the hint with project.objects.domainObjectContainer() without factory. It correctly creates an instance of my DockerComposeRunSettings class, without the @Inject annotation, and correctly passes the String name parameter.twisterrob
07/20/2023, 12:41 PMPiotr Minkina
07/20/2023, 12:44 PM@Inject should be set, instead of that it must be set.