Caleb Cushing
11/19/2024, 10:33 PMsemver : Provider
semver { }
... but it's read only...Javi
11/19/2024, 10:47 PMCaleb Cushing
11/19/2024, 10:47 PMsemver.get().version
was better than semver.version.get().version
Caleb Cushing
11/19/2024, 10:49 PMversion.set(semver)
Javi
11/19/2024, 10:49 PMCaleb Cushing
11/19/2024, 10:50 PMJavi
11/19/2024, 10:51 PMCaleb Cushing
11/19/2024, 10:51 PMJavi
11/19/2024, 10:51 PMJavi
11/19/2024, 10:52 PMsemver.version.get().version
that is weird
I would expect
semver.version.get()
Caleb Cushing
11/19/2024, 10:52 PMJavi
11/19/2024, 10:52 PMget()
outside tasksCaleb Cushing
11/19/2024, 10:52 PMJavi
11/19/2024, 10:52 PMmyCustomPlugin.version.set(semver.version)
Caleb Cushing
11/19/2024, 10:52 PMCaleb Cushing
11/19/2024, 10:53 PMCaleb Cushing
11/19/2024, 10:53 PMversion
in gradle with a provider? you have to call getCaleb Cushing
11/19/2024, 10:53 PMJavi
11/19/2024, 10:53 PMProvider<String>
soon, so I would waitCaleb Cushing
11/19/2024, 10:54 PMsemver.get()
returns a Semver
Caleb Cushing
11/19/2024, 10:54 PMJavi
11/19/2024, 10:54 PMCaleb Cushing
11/19/2024, 10:54 PMCaleb Cushing
11/19/2024, 10:54 PMCaleb Cushing
11/19/2024, 10:55 PMCaleb Cushing
11/19/2024, 10:55 PMJavi
11/19/2024, 10:55 PMCaleb Cushing
11/19/2024, 10:55 PMJavi
11/19/2024, 10:55 PMephemient
11/19/2024, 10:55 PMephemient
11/19/2024, 10:56 PMProvider
be special-cased?Caleb Cushing
11/19/2024, 10:56 PMCaleb Cushing
11/19/2024, 10:57 PMCaleb Cushing
11/19/2024, 10:59 PMsemver.version.get()
with the possibility that someone will want to do something with the version
property that is on the object returned from the get
note: in the future that could be the map or whateverCaleb Cushing
11/19/2024, 10:59 PMget
than any of a number of ways you can get the Semver
returnedCaleb Cushing
11/19/2024, 11:00 PMCaleb Cushing
11/19/2024, 11:02 PMJavi
11/19/2024, 11:05 PMversion = semver.get()
?Javi
11/19/2024, 11:06 PMProvider<String>
like to the project version
, without any issueCaleb Cushing
11/19/2024, 11:06 PMCaleb Cushing
11/19/2024, 11:07 PMCaleb Cushing
11/19/2024, 11:07 PMCaleb Cushing
11/19/2024, 11:07 PMCaleb Cushing
11/19/2024, 11:07 PMSemver
objectCaleb Cushing
11/19/2024, 11:09 PMCaleb Cushing
11/19/2024, 11:09 PMCaleb Cushing
11/19/2024, 11:09 PMJavi
11/19/2024, 11:10 PMProvider<String>
directly with your plugin and provide a map
like function in your semver
extension to allow the user to put whatever they want
semver {
map {
// do whatever with git branches, tags, etc.
}
}
Caleb Cushing
11/19/2024, 11:11 PMCaleb Cushing
11/19/2024, 11:11 PMJavi
11/19/2024, 11:11 PMCaleb Cushing
11/19/2024, 11:11 PMCaleb Cushing
11/19/2024, 11:11 PMJavi
11/19/2024, 11:12 PMProvider
that was overriding toString()
Caleb Cushing
11/19/2024, 11:12 PMJavi
11/19/2024, 11:12 PMCaleb Cushing
11/19/2024, 11:12 PMCaleb Cushing
11/19/2024, 11:12 PMJavi
11/19/2024, 11:12 PMProvider<String>
which overrides toString()
to call `get()`on itCaleb Cushing
11/19/2024, 11:13 PMJavi
11/19/2024, 11:13 PMversion.toString()
inside a task, it was doing the correct thingCaleb Cushing
11/19/2024, 11:13 PMCaleb Cushing
11/19/2024, 11:13 PMCaleb Cushing
11/19/2024, 11:14 PMCaleb Cushing
11/19/2024, 11:14 PMCaleb Cushing
11/19/2024, 11:14 PMCaleb Cushing
11/20/2024, 6:32 PMsemver.version.get()
as I've went back and forth in that a lot. Is it really good to mix providers with configurable settings? that feels like the big reason to do that, is to not have another extension like semverConfig if I wanted there to be settings that affect what the provider. For example semverConfig.dirty.set(true)
would allow the version to contain dirty metadata, which causes a lot of thrash because every file change changes the configuration input.