Alejandro Serrano.Mena
10/27/2025, 9:15 AMid("io.arrow-kt.optics") version "2.2.0-beta.8" in your plugins block
3. Add gradlePluginPortal() to your repositories (dependencyResolutionManagement.repositories) block
4. Add a call to arrowOptics() at the end of your kotlin block (doesn't matter if its a JVM or KMP project)
Then try to run the compilation and see nothing fails. Afterwards, try to remove useless companion objects tyou created only for Arrow Optics and see whether everything still works.
Thanks in advance for all your help!sindrenm
10/27/2025, 9:44 AMgradlePluginPortal() not only to my pluginManagement.repositories, but also to dependencyResolutionManagement.repositories. Is that intentional?Alejandro Serrano.Mena
10/27/2025, 9:45 AMsindrenm
10/27/2025, 9:49 AMinternal companion objects for internal data classes. That unfortunately causes a compiler error.
This is generated properly:
@optics
data class SomePublicDataClass(val name: String)
This does not compile:
@optics
internal data class SomeInternalDataClass(val name: String)sindrenm
10/27/2025, 9:50 AM@optics
internal data class SomeInternalDataClass(val name: String) {
internal companion object
}sindrenm
10/27/2025, 9:54 AMAlejandro Serrano.Mena
10/27/2025, 9:56 AMsindrenm
10/27/2025, 9:57 AMAlejandro Serrano.Mena
10/29/2025, 11:29 AMbeta.11 no longer requires adding gradlePluginPortal to your reposiotories 🙂 @sindrenm would you mind checking if this still works for you?sindrenm
10/30/2025, 7:04 AMAlejandro Serrano.Mena
10/30/2025, 8:40 AMsindrenm
10/30/2025, 11:04 AMsindrenm
12/03/2025, 1:40 PM