mirror of
https://github.com/danieldemus/openhab-core.git
synced 2026-07-29 12:34:22 +02:00
Upgrade Units of Measurement dependencies (#2319)
Upgrades UoM dependencies to: * javax.measure 2.1.2 * si-units 2.0.1 * indriya 2.1.2 An openHAB OSGi-ified si-units bundle is used as runtime dependency, because the latest si-units release is still missing proper OSGi manifest headers. Notable changes: * Quantity not longer implements an `equals` method, so the unit tests had to be adjusted. This should have any impact outside of the unit tests though since the rest of openHAB should be using QuantityType instead. * RationalConverter is not package private, so instances of it much be created through the MultiplyConverter static functions. * Quantities.getQuantity can no longer parse values without units like `100`. A workaround has been implemented. * The unicode greek `mu` letter is now returned for unit prefixes instead of the unicode `micro` character. These characters are visually identical but the unit tests had to be adjusted. The new library seems to parse both types just fine. Also-by: Connor Petty <mistercpp2000+gitsignoff@gmail.com> Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
+26
-7
@@ -436,22 +436,41 @@
|
||||
</dependency>
|
||||
|
||||
<!-- Measurement -->
|
||||
<dependency>
|
||||
<groupId>jakarta.annotation</groupId>
|
||||
<artifactId>jakarta.annotation-api</artifactId>
|
||||
<version>2.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.inject</groupId>
|
||||
<artifactId>jakarta.inject-api</artifactId>
|
||||
<version>2.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.measure</groupId>
|
||||
<artifactId>unit-api</artifactId>
|
||||
<version>1.0</version>
|
||||
<version>2.1.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<!-- The si.uom:si-units manifest has no Export-Package entry. As workaround this OSGi-ify bundle is used. -->
|
||||
<dependency>
|
||||
<groupId>org.openhab.osgiify</groupId>
|
||||
<artifactId>si.uom.si-units</artifactId>
|
||||
<version>2.0.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>tec.uom</groupId>
|
||||
<artifactId>uom-se</artifactId>
|
||||
<version>1.0.10</version>
|
||||
<groupId>si.uom</groupId>
|
||||
<artifactId>si-quantity</artifactId>
|
||||
<version>2.0.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>tec.uom.lib</groupId>
|
||||
<artifactId>uom-lib-common</artifactId>
|
||||
<version>1.0.3</version>
|
||||
<groupId>tech.units</groupId>
|
||||
<artifactId>indriya</artifactId>
|
||||
<version>2.1.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user