-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add version to jar manifest and read at runtime for SDK version header (
#22) Add version to the jar manifest and read from that to send the SDK version header https://docs.gradle.org/current/samples/sample_building_kotlin_libraries.html#customize_the_library_jar https://stackoverflow.com/a/43065467 To avoid unnecessarily reading from the manifest file, we store the value in a companion object which should have the effect of making it a singleton. An alternative using java properties was considered based on https://stackoverflow.com/a/70088083, but the jar manifest seemed more appropriate
- Loading branch information
1 parent
aa95363
commit 79a0220
Showing
3 changed files
with
24 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.inngest | ||
|
||
class Version() { | ||
companion object { | ||
private val version: String = Version::class.java.getPackage().implementationVersion | ||
|
||
fun getVersion(): String = version | ||
} | ||
} |