File tree Expand file tree Collapse file tree
resources/src/commonMain/kotlin/dev/icerock/moko/resources/desc/image Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ This is a Kotlin MultiPlatform library that provides access to the resources on
5757- kotlin 1.4.21
5858 - 0.13.2
5959 - 0.14.0
60+ - 0.15.0
6061
6162## Installation
6263root build.gradle
@@ -67,7 +68,7 @@ buildscript {
6768 }
6869
6970 dependencies {
70- classpath "dev.icerock.moko:resources-generator:0.14 .0"
71+ classpath "dev.icerock.moko:resources-generator:0.15 .0"
7172 }
7273}
7374
@@ -84,7 +85,7 @@ project build.gradle
8485apply plugin: "dev.icerock.mobile.multiplatform-resources"
8586
8687dependencies {
87- commonMainApi("dev.icerock.moko:resources:0.14 .0")
88+ commonMainApi("dev.icerock.moko:resources:0.15 .0")
8889}
8990
9091multiplatformResources {
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ object Deps {
1919
2020 private const val mokoGraphicsVersion = " 0.5.0"
2121 private const val mokoParcelizeVersion = " 0.5.0"
22- const val mokoResourcesVersion = " 0.14 .0"
22+ const val mokoResourcesVersion = " 0.15 .0"
2323
2424 object Android {
2525 const val compileSdk = 28
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2021 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license.
3+ */
4+
5+ package dev.icerock.moko.resources.desc.image
6+
7+ interface ImageDesc {
8+ companion object
9+ }
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2021 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license.
3+ */
4+
5+ package dev.icerock.moko.resources.desc.image
6+
7+ import dev.icerock.moko.resources.ImageResource
8+
9+ class ImageDescResource (val resource : ImageResource ) : ImageDesc
10+
11+ @Suppress(" FunctionName" )
12+ fun ImageDesc.Companion.Resource (resource : ImageResource ): ImageDesc = ImageDescResource (resource)
13+
14+ fun ImageResource.asImageDesc () = ImageDesc .Resource (this )
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2021 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license.
3+ */
4+
5+ package dev.icerock.moko.resources.desc.image
6+
7+ class ImageDescUrl (val url : String ) : ImageDesc
8+
9+ @Suppress(" FunctionName" )
10+ fun ImageDesc.Companion.Url (url : String ): ImageDesc = ImageDescUrl (url)
11+
12+ fun String.asImageUrl (): ImageDesc = ImageDesc .Url (this )
You can’t perform that action at this time.
0 commit comments