-
Notifications
You must be signed in to change notification settings - Fork 188
add support for kotlin custom config variables #198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Zach Harel <[email protected]>
Signed-off-by: Zach Harel <[email protected]>
Signed-off-by: Zach Harel <[email protected]>
Signed-off-by: Zach Harel <[email protected]>
… compile Signed-off-by: Zach Harel <[email protected]>
…le value support Signed-off-by: Zach Harel <[email protected]>
|
Why can't you add support for Kotlin properties without |
|
i do not want to write annotation processors |
|
That is not necessary, you can do it at runtime using Kotlin reflection. |
|
Just an opinion, I find this API much more native to kotlin. However seeing kotlin properties from objects without @JvmField or @JvmStatic can be done from java by looking for the getProperty (or isProperty for Boolean properties) and setProperty functions in java reflection. Also in my team's code we just use @file:Config at the top of the Constants file along with @JvmField on the properties to get top-level properties shown in the config menu. (it's shown as a ConstantsKt class generated by kotlin in bytecode) |
Or just use kotlin reflection
You can add |
It's better that way, just said that as a hacky workaround
I honestly forgot about that, thx. |
so now u do
and it works yay wahoo
this uses reflection stuff like
ReflectionConfigbut also different somewhat so I had to write the entire thing again yayyyyyyyyyy