Kazik
02/05/2024, 1:35 PMJoel Denke
02/05/2024, 1:52 PMKazik
02/05/2024, 1:55 PMdata class X(val type: Int)
I want to have an access to type
field in module B, but not for other consumers. In this example internal
simply not working. Maybe there are some other annotations or something else that I can specify that this field is for internal use of my libraries.Riccardo Lippolis
02/05/2024, 2:02 PMapi
vs implementation
dependencies in the Gradle java-library
plugin (assuming you're creating a Java library and not multiplatform). See: https://gradlehero.com/how-to-use-gradle-api-vs-implementation-dependencies-with-the-java-library-plugin/Michael Krussel
02/05/2024, 2:23 PMCLOVIS
02/05/2024, 5:54 PMimplementation
to avoid exposing it as part of its own API. However, I wouldn't really recommend it, it makes everything more complicated and you increase your risks of binary incompatibilities if you don't enforce platforms.
What is your problem exactly? In general, you shouldn't need this: each module should be completely independent and only expose what other modules need. It seems you want to have a module to secretly expose a part of its internals…Kazik
02/06/2024, 11:30 AMCLOVIS
02/06/2024, 12:43 PM