This message was deleted.
# community-support
s
This message was deleted.
j
It works when not used in subprojects
v
Well, then don't use it, it is evil anyway. :-D
But interesting that it doesn't work
Probably a bug you should report if there is no issue yet. As a work-around you can do
Copy code
val p = project
subprojects {
    p.kt....
}
j
I did try that, it was very confusing when that didn’t work 😅
v
You say what I wrote does not work?
j
Well, no wait maybe! Sorry! I meant using project in subprojects. I never tried making a ref to project out of subprojects. And it makes sense that it should work, because subproject most likely changes project to become what ever subproject, but with the ref to the root project it should theoretically work
v
It also practically works and yes,
project
within the closure is the subproject.
And I still would say you should report it, even if
subproject { ... }
is discouraged, I'd say it still should work probably.
j