Piotr Krzemiński
04/06/2024, 7:42 AMVampire
04/06/2024, 8:38 AMPiotr Krzemiński
04/07/2024, 7:37 PMdon't call a task and parse its output, instead use the tooling API to extract the information you want like an ide doesthanks for the hint!
when / where would you generate the accessors? They must be generated before compiling the scriptassuming that creating a compiler plugin is still not recommended because of unstable API and inconvenient usage from within the scripts, I thought about having an extra step in the consistency check job, similar to where action bindings are generated in the client-side generation (ref). The API is TBD, I thought about providing a generic extension point to be able to inject custom steps in this job
Unless you have a verify-all step you would still only on release see that it is brokenyes, maybe it's about time to provide proper tooling/docs on how to implement such complete check (ref)
Vampire
04/07/2024, 7:47 PMPiotr Krzemiński
06/20/2024, 4:49 PMPiotr Krzemiński
06/20/2024, 4:52 PMpublic
flag means: https://github.com/gradle/gradle/blob/f6f93cbb52aa152409d15d65513d4356f8c45480/pla[…]le/plugins/ide/internal/tooling/model/LaunchableGradleTask.java - is it like an internal task, not a part of the API?Piotr Krzemiński
06/20/2024, 4:53 PMVampire
06/20/2024, 8:53 PMVampire
06/20/2024, 8:53 PMVampire
06/20/2024, 8:54 PMgw tasks
but are shown by gw tasks --all
.Vampire
06/20/2024, 8:54 PMVampire
07/06/2024, 10:10 AMVampire
07/06/2024, 10:10 AMVampire
07/06/2024, 10:12 AMVampire
07/06/2024, 10:12 AMPiotr Krzemiński
07/19/2024, 10:11 AMtasks["shared"]["model"]["build"]
is valid. If it's not, the script would fail in runtime. I know, it's not proper type-safety and it doesn't give proper task discoverability in the IDE, but it will still fail before running the YAML so the benefit is there. I'm willing to switch to generating the Kotlin accessors once Kotlin Scripting gets some reasonable integration with code generation or compiler plugins. Without this, it's just too much hassle.
Let me know if it looks sound!Vampire
07/19/2024, 10:45 AMtasks
is a method that gets the path like tasks(":shared:model:build")
or if tasks
is already some thing, an invoke(...)
method that accepts String
for vararg String
to get that same syntaxVampire
07/19/2024, 10:45 AMPiotr Krzemiński
07/19/2024, 10:46 AMVampire
07/19/2024, 10:47 AMVampire
07/19/2024, 10:47 AMVampire
07/19/2024, 10:48 AMVampire
07/19/2024, 10:48 AMbuil
if this resolves unambiguously to build
Piotr Krzemiński
07/19/2024, 10:48 AMtasksUnsafe
function or equivalentVampire
07/19/2024, 10:48 AMVampire
07/19/2024, 10:49 AMPiotr Krzemiński
07/19/2024, 10:49 AMtasksUnchecked
, tasksDynamic
?Vampire
07/19/2024, 10:49 AMVampire
07/19/2024, 10:49 AMtasksUnverified
Vampire
07/19/2024, 10:50 AMVampire
07/19/2024, 10:50 AMPiotr Krzemiński
07/19/2024, 10:51 AMPiotr Krzemiński
07/21/2024, 8:47 AMorg.gradle:gradle-tooling-api
. It's hosted in a different repo than Maven Central (<https://repo.gradle.org/gradle/libs-releases|https://repo.gradle.org/gradle/libs-releases>
) and adding a dependency on this lib forces the users of their scripts to add this repo with @file:Repository
. I don't like it because it's effectively a breaking change caused by changing an implementation detail of the lib. Some users may not even care about this feature, so I don't want to force everyone to add the repo.
I have two ideas:
1. Ask Gradle folks to publish the lib to Maven Central.
2. Bundle the lib in github-workflows-kt's JAR, something like a fat JAR but only with this single library attached.
Thoughts? 😊Piotr Krzemiński
07/21/2024, 8:55 AMVampire
07/21/2024, 10:15 AMPiotr Krzemiński
07/21/2024, 6:00 PMPiotr Krzemiński
07/21/2024, 8:19 PMcompileOnly
?Vampire
07/21/2024, 8:37 PMVampire
07/21/2024, 8:37 PM