In a multiplatform library project, is there a way I can get the library version in my commonMain source files?
a
Adam S
05/24/2023, 8:15 PM
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
Bradleycorn
05/24/2023, 8:41 PM
@Adam S that's the one.
a
Adam S
05/24/2023, 8:49 PM
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