gaelmarhic / Quadrant

A Gradle plugin for Android that makes navigation easy in multi-module projects.
Apache License 2.0
216 stars 13 forks source link

Support strict-api for generated classes #11

Closed pascaldornfeld closed 2 years ago

pascaldornfeld commented 2 years ago

In my architecture I got a common module and multiple ui modules. I apply the plugin on the common module so the generated classes are available in all ui modules. In my common module I use strict api so I don't accidentally expose code to lower modules (freeCompilerArgs = ["-Xexplicit-api=strict"]). Because of that I get exceptions from the generated classes: "Visibility must be specified in explicit API mode". It can be fixed by adding "public" in front of every object and constant.

gaelmarhic commented 2 years ago

Done in #12.

gaelmarhic commented 2 years ago

Hey there @pascaldornfeld.

First of all, thank you for your interest in Quadrant and for reporting this issue.

I have just created a new version with the fix: https://github.com/gaelmarhic/Quadrant/releases/tag/v1.7 https://plugins.gradle.org/plugin/com.gaelmarhic.quadrant

Could you test it on your project and let me know how it goes?

Thanks.

pascaldornfeld commented 2 years ago

I tested it in my app. It compiles and app works. image

For comparision, this was 1.6.1: image