Hi there, is there a way to use `internal` to all...
# getting-started
h
Hi there, is there a way to use
internal
to allow visibility from other source modules in the same gradle project? E.g. I want to use some
internal
method defined in the main module from within the test module.
j
You can use
@file:Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER", "INVISIBLE_SETTER")
to access
internal
APIs.
y
Likely what you might want is an
OptIn
annotation
plus1 1
v
I believe you should already be able to use internal stuff in main from test, because test is configured as friend or something like that
e
creating your own
@RequiresOptIn
annotation to use instead of
internal
is the right way to limit sharing across modules. you can see this pattern on other libraries