https://kotlinlang.org logo
#k2-early-adopters
Title
# k2-early-adopters
z

Zac Sweers

08/24/2022, 6:48 PM
can code compiled with k2 be consumed in projects not using k2? i.e. if we wanted to enable it in subprojects that can enable it but not necessarily app
m

mcpiroman

08/25/2022, 7:38 AM
Yup, at least I do it and it works
d

dmitriy.novozhilov

08/25/2022, 7:56 AM
Basic answer is no. K2 marks all binaries as pre-release, which means that they can be used as dependencies only in pre-release project (this behavior is needed because we can not guarantee that ABI produced by K2 won't changed before release) But if you want to compile some internal library/subproject and don't care about ABI changes (e.g. because all consumers of this lib are compiled together with lib itself) you can add
-Xallow-unstable-dependencies
to arguments of your application
10 Views