This message was deleted.
# community-support
s
This message was deleted.
b
To unlock --tests for you proxy task, make it a proper task implementation with registered tests option. Then just grab and replicate macosArmXXX task configuration
👀 1
m
mmmm but how do I link a task input to another task input ?
b
You don't. You recreate the task completely.
m
Oh my
b
i.e. your new task will not depend on macosXXX, but instead will act as an alternative to it with replicated and extended config
m
Is that even possible without pulling the whole Kotlin plugin source?
b
Unfortunately gradle does not support extending existing tasks
m
Pretty sure
macosArm64Test
references a bunch of private/internal symbols so it's not just copy/paste a file
b
You already have the whole kotlin plugin source on your classpath
m
I have the bytecode
b
Run gradlew model to figure out task type
m
That's a lot of trouble to workaround the IntelliJ awkwardness 😅
b
Then use ide class navigation to open it up and see which options you need to propagate and which base types you need to extend
m
I'll just run from the command line
But thanks for the advice!
b
It's really not. In the end you just proxy the config from kotlin task to your new task
Give it a go and see for yourself ;)
m
I mean, I don't even know the concrete type of
macosArm64Test
It's an instance of
KotlinNativeTest
Looks like it's KotlinNativeHostTest
So now I can create a new
KotlinNativeHostTest
task
Now I need to find where in the Kotlin plugin this stuff is configured and copy/paste that?
That goes into
KotlinNativeTargetWithHostTestsConfigurator
b
Not copy, just proxy into actual task config. That way you don't have to bother with actual values
m
That's the thing
KotlinNativeHostTest
input values are configured in the Kotlin plugin. The only input value I can proxy is
--tests
. All the rest I have no idea how to get
b
That's not what I mean. I meant this myCustomTask.domainProp = macosArm64Test.domainProp Do this for all public properties
m
For an example, there is in KotlinNativeTest:
Copy code
val executableProperty: Property<FileCollection>
It's all lazy
b
Even better!
myTask.executableProperty.set(kotlinTask.executableProperty)
You can even flatMap task provider to avoid configuring kotlinTask