In a multiplatform library project, is there a way...
# multiplatform
b
In a multiplatform library project, is there a way I can get the library version in my commonMain source files?
a
what do you mean by the library version? Do you mean the version of the project that’s defined in the
build.gradle.kts
?
b
@Adam S that's the one.
a
you can do it with a Gradle task that will generate a Kotlin file There’s a plugin that will do it, or you can write & set up the task manually: https://stackoverflow.com/a/74771876/4161471
m
You can also use https://github.com/yshrsmz/BuildKonfig It will create a Kotlin object in commonMain