What is your solution to get the version number fo...
# compose-desktop
s
What is your solution to get the version number for the about dialog? Is there a standard way like Androids "BuildConfig" or do I need to implement something on my own?
โœ… 1
o
same solution as in above message shall work
๐Ÿ™ 1
m
BuildKonfig is working well for me in a multiplatform module https://github.com/yshrsmz/BuildKonfig
๐Ÿ™ 4
๐Ÿ‘ 5
t
@Stefan Oltmann I am using my own version and it works perfectly fine.
e
s
@ephemient I switched to this solution, but it's not quite clear when to execute it. I tried to let it depend on "preBuild", but that only works always for Android. Now I do it via project.afterEvaluate{}, but that is problematic with "clean build" task ๐Ÿ˜•
e
for Android, use
android.applicationVariants.all { registerJavaGeneratingTask(...) }
(or whatever needs to be tweaked for your situation) for JVM projects, that should work out of the box, the file collection given to the sourceset tracks the dependency automatically not sure why it would be interacting badly with
clean
, but you could try
mustRunAfter("clean")
s
Thank you, I will try that ๐Ÿ™‚
e
ah, that seems to be just a gradle issue. https://github.com/gradle/gradle/issues/2488
๐Ÿ‘ 1