Caleb Cushing
10/31/2024, 7:07 PMBuildService into a ValueSource
java.lang.IllegalArgumentException: Unable to determine constructor argument #2: missing parameter of type GitSupplierService, or no service of type GitSupplierService.
at org.gradle.internal.instantiation.generator.DependencyInjectingInstantiator.addServicesToParameters(DependencyInjectingInstantiator.java:202)
at org.gradle.internal.instantiation.generator.DependencyInjectingInstantiator.convertParameters(DependencyInjectingInstantiator.java:122)
at org.gradle.internal.instantiation.generator.DependencyInjectingInstantiator.doCreate(DependencyInjectingInstantiator.java:63)
...
and I can't inject other providers into it either... Since it only allows one set of parameters, I'm not certain what the story is on how I'm supposed to get multiple sources of parameters in one.
hrm... well this isn't an answer, unless someone has a solution that isn't documentedThomas Broyer
10/31/2024, 8:17 PMhow I'm supposed to get multiple source of parameters in oneI'm afraid you'll have to provide more details on what you're trying to do.
Vampire
11/01/2024, 12:16 AMwell I guess I can't inject myThat's halfway correct currently, see: https://docs.gradle.org/current/userguide/configuration_cache.html#config_cache:not_yet_implemented:build_services_in_fingerprint and https://github.com/gradle/gradle/issues/24085. So the statement holds if the value of the value source is accessed at configuration time. For the rest, what Thomas said 🙂into aBuildServiceValueSource
Caleb Cushing
11/01/2024, 2:17 PMCaleb Cushing
11/01/2024, 2:30 PMBuildService or ValueSource . If I go the latter, I think I"m going to have to figure out more about how gradle serializes to the configuration cache. I suspect I really need to make 1 ValueSource for all of the metadata, set those values on an Object that has Properties but the interface exposes providers, although... wait, that won't work, I can't inject properties/providers from inside a value source.Caleb Cushing
11/01/2024, 2:31 PMCaleb Cushing
11/01/2024, 2:31 PMCaleb Cushing
11/01/2024, 2:31 PMCaleb Cushing
11/01/2024, 2:31 PMCaleb Cushing
11/01/2024, 2:32 PMCaleb Cushing
11/01/2024, 2:36 PMCaleb Cushing
11/01/2024, 2:44 PMmyExtension.prop.set(providers.of(ValueSource.class, () -> {}))
I'm not certain if that's actually lazy though, or if that set calls get more or less immediatelyVampire
11/01/2024, 3:05 PMprop is retrievedCaleb Cushing
11/01/2024, 3:06 PMVampire
11/01/2024, 3:11 PMCaleb Cushing
11/01/2024, 4:05 PMgit.branch // Provider<String>Caleb Cushing
11/01/2024, 4:06 PMsemver // Provider<String> it won't have any of my documentationVampire
11/01/2024, 4:20 PMCaleb Cushing
11/01/2024, 4:21 PMCaleb Cushing
11/01/2024, 4:21 PMCaleb Cushing
11/01/2024, 4:54 PMValueSource 's evaluated if get is never called?Vampire
11/01/2024, 6:42 PM