aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--buildSrc/src/main/groovy/ca/allanwang/kau/Versions.groovy2
-rw-r--r--core/src/main/kotlin/ca/allanwang/kau/kotlin/LazyContext.kt7
2 files changed, 5 insertions, 4 deletions
diff --git a/buildSrc/src/main/groovy/ca/allanwang/kau/Versions.groovy b/buildSrc/src/main/groovy/ca/allanwang/kau/Versions.groovy
index decb2fe..4b7149e 100644
--- a/buildSrc/src/main/groovy/ca/allanwang/kau/Versions.groovy
+++ b/buildSrc/src/main/groovy/ca/allanwang/kau/Versions.groovy
@@ -24,7 +24,7 @@ class Versions {
static def blurry = '2.1.1'
// https://dl.google.com/dl/android/maven2/com/android/support/constraint/group-index.xml
- static def constraintLayout = '1.1.0'
+ static def constraintLayout = '1.1.3'
// https://github.com/mikepenz/FastAdapter#using-maven
static def fastAdapter = '3.2.5'
diff --git a/core/src/main/kotlin/ca/allanwang/kau/kotlin/LazyContext.kt b/core/src/main/kotlin/ca/allanwang/kau/kotlin/LazyContext.kt
index ab531bd..0a45b65 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/kotlin/LazyContext.kt
+++ b/core/src/main/kotlin/ca/allanwang/kau/kotlin/LazyContext.kt
@@ -18,10 +18,11 @@ fun lazyInterpolator(@InterpolatorRes id: Int) = lazyContext<Interpolator> { Ani
fun lazyAnimation(@AnimRes id: Int) = lazyContext<Animation> { AnimationUtils.loadAnimation(it, id) }
-fun <T : Any> lazyContext(initializer: (context: Context) -> T): LazyContext<T> = LazyContext(initializer)
+fun <T> lazyContext(initializer: (context: Context) -> T): LazyContext<T> = LazyContext(initializer)
-class LazyContext<out T : Any>(private val initializer: (context: Context) -> T, lock: Any? = null) {
- @Volatile private var _value: Any = UNINITIALIZED
+class LazyContext<out T>(private val initializer: (context: Context) -> T, lock: Any? = null) {
+ @Volatile
+ private var _value: Any? = UNINITIALIZED
private val lock = lock ?: this
fun invalidate() {