mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2024-12-23 00:57:15 +00:00
commit
75fa88b00d
@ -22,5 +22,6 @@ jobs:
|
||||
include:
|
||||
- stage: build
|
||||
script: ./gradlew build -s -x jvmTest -x jsIrTest -x jsIrBrowserTest -x jsIrNodeTest -x jsLegacyTest -x jsLegacyBrowserTest -x jsLegacyNodeTest
|
||||
- state: test
|
||||
script: ./gradlew allTests
|
||||
# Tests are temporarily disabled on public travis due to the problems of launching
|
||||
# - state: test
|
||||
# script: ./gradlew allTests
|
||||
|
@ -1,5 +1,14 @@
|
||||
# Changelog
|
||||
|
||||
## 0.4.3
|
||||
|
||||
* `Versions`:
|
||||
* `Kotlin`: `1.4.10` -> `1.4.20`
|
||||
* `Common`:
|
||||
* Two new extensions for Android:
|
||||
* `Resources#getSp`
|
||||
* `Resources#getDp`
|
||||
|
||||
## 0.4.2
|
||||
|
||||
* `Repos`:
|
||||
|
@ -0,0 +1,13 @@
|
||||
@file:Suppress("NOTHING_TO_INLINE")
|
||||
|
||||
package dev.inmo.micro_utils.common
|
||||
|
||||
import android.content.res.Resources
|
||||
|
||||
inline fun Resources.getSp(
|
||||
resId: Int
|
||||
) = getDimension(resId) / displayMetrics.scaledDensity
|
||||
|
||||
inline fun Resources.getDp(
|
||||
resId: Int
|
||||
) = getDimension(resId) * displayMetrics.density
|
@ -7,7 +7,7 @@ android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
org.gradle.jvmargs=-Xmx3072m
|
||||
|
||||
kotlin_version=1.4.10
|
||||
kotlin_version=1.4.20
|
||||
kotlin_coroutines_version=1.4.1
|
||||
kotlin_serialisation_core_version=1.0.1
|
||||
kotlin_exposed_version=0.28.1
|
||||
@ -41,5 +41,5 @@ dokka_version=1.4.0
|
||||
# Project data
|
||||
|
||||
group=dev.inmo
|
||||
version=0.4.2
|
||||
android_code_version=6
|
||||
version=0.4.3
|
||||
android_code_version=7
|
||||
|
Loading…
Reference in New Issue
Block a user