diff --git a/README.md b/README.md index 7561febe..19013348 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,8 @@ [![Version](https://img.shields.io/maven-central/v/com.alialbaali.kamel/kamel-core?label=version&color=blue)](https://search.maven.org/search?q=com.alialbaali.kamel) [![Snapshot](https://img.shields.io/nexus/s/com.alialbaali.kamel/kamel-core?label=snapshot&server=https%3A%2F%2Foss.sonatype.org)](https://oss.sonatype.org/content/repositories/snapshots/com/alialbaali/kamel/) [![License](https://img.shields.io/github/license/alialbaali/kamel)](http://www.apache.org/licenses/LICENSE-2.0) -[![Kotlin](https://img.shields.io/badge/kotlin-v1.4.31-blue.svg?logo=kotlin)](http://kotlinlang.org) -[![Compose](https://img.shields.io/badge/compose-v0.3.2-v?logo=compose&color=blue)](http://kotlinlang.org) +[![Kotlin](https://img.shields.io/badge/kotlin-v1.5.0-blue.svg?logo=kotlin)](http://kotlinlang.org) +[![Compose](https://img.shields.io/badge/compose-v0.4.0.build209-v?logo=compose&color=blue)](http://kotlinlang.org) Kamel is an asynchronous media loading library for Compose. It provides a simple, customizable and efficient way to load, cache, decode and display images in your application. By default, it uses Ktor client for loading resources. @@ -48,7 +48,7 @@ kotlin { sourceSets { commonMain { dependencies { - implementation("com.alialbaali.kamel:kamel-image:0.2.0") + implementation("com.alialbaali.kamel:kamel-image:0.2.1") // ... } } @@ -62,7 +62,7 @@ Add the dependency to the dependencies block: ```kotlin dependencies { - implementation("com.alialbaali.kamel:kamel-image:0.2.0") + implementation("com.alialbaali.kamel:kamel-image:0.2.1") // ... } ``` diff --git a/build.gradle.kts b/build.gradle.kts index 9f1a1d5d..b7f1ab3d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -9,7 +9,6 @@ plugins { buildscript { repositories { google() - jcenter() mavenCentral() maven(url = "https://maven.pkg.jetbrains.space/public/p/compose/dev") maven(url = "https://dl.bintray.com/kotlin/dokka") @@ -57,7 +56,6 @@ allprojects { repositories { google() - jcenter() mavenCentral() maven(url = "https://maven.pkg.jetbrains.space/public/p/compose/dev") maven(url = "https://dl.bintray.com/kotlin/dokka") diff --git a/buildSrc/src/main/kotlin/Dependencies.kt b/buildSrc/src/main/kotlin/Dependencies.kt index a2abc9e8..ec2f464e 100644 --- a/buildSrc/src/main/kotlin/Dependencies.kt +++ b/buildSrc/src/main/kotlin/Dependencies.kt @@ -29,16 +29,16 @@ object Dependencies { private object Versions { - const val Kotlin = "1.4.31" - const val Ktor = "1.5.1" - const val Compose = "0.3.2" - const val Coroutines = "" - const val AGP = "7.0.0-alpha08" + const val Kotlin = "1.5.0" + const val Ktor = "1.5.4" + const val Coroutines = "1.5.0" + const val Compose = "0.4.0-build209" + const val AGP = "7.0.0-beta02" object Android { - const val Appcompat = "1.2.0" - const val Core = "1.3.2" - const val ActivityCompose = "1.3.0-alpha02" + const val Appcompat = "1.3.0" + const val Core = "1.5.0" + const val ActivityCompose = "1.3.0-alpha08" const val Material = "1.3.0" } diff --git a/buildSrc/src/main/kotlin/Kamel.kt b/buildSrc/src/main/kotlin/Kamel.kt index 70c95228..808a3be0 100644 --- a/buildSrc/src/main/kotlin/Kamel.kt +++ b/buildSrc/src/main/kotlin/Kamel.kt @@ -1,4 +1,4 @@ object Kamel { const val Group = "com.alialbaali.kamel" - const val Version = "0.2.1-SNAPSHOT" + const val Version = "0.2.1" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 46738d89..da7ab408 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Fri Feb 26 19:23:50 TRT 2021 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/kamel-core/src/commonTest/kotlin/io/kamel/core/config/KamelConfigBuilderTest.kt b/kamel-core/src/commonTest/kotlin/io/kamel/core/config/KamelConfigBuilderTest.kt index 24431671..095abfb1 100644 --- a/kamel-core/src/commonTest/kotlin/io/kamel/core/config/KamelConfigBuilderTest.kt +++ b/kamel-core/src/commonTest/kotlin/io/kamel/core/config/KamelConfigBuilderTest.kt @@ -1,7 +1,9 @@ package io.kamel.core.config +import io.kamel.core.fetcher.Fetcher import io.kamel.core.fetcher.FileFetcher import io.kamel.core.fetcher.HttpFetcher +import io.kamel.core.mapper.Mapper import io.kamel.core.mapper.StringMapper import io.kamel.core.mapper.URIMapper import io.kamel.core.mapper.URLMapper @@ -25,7 +27,7 @@ class KamelConfigBuilderTest { builder.fileFetcher() assertTrue { builder.fetchers.size == 1 } - assertTrue { builder.fetchers.contains(FileFetcher) } + assertTrue { builder.fetchers.contains>(FileFetcher) } } @Test @@ -41,7 +43,7 @@ class KamelConfigBuilderTest { builder.stringMapper() assertTrue { builder.mappers.size == 1 } - assertTrue { builder.mappers.contains(StringMapper) } + assertTrue { builder.mappers.contains>(StringMapper) } } @Test @@ -49,7 +51,7 @@ class KamelConfigBuilderTest { builder.urlMapper() assertTrue { builder.mappers.size == 1 } - assertTrue { builder.mappers.contains(URLMapper) } + assertTrue { builder.mappers.contains>(URLMapper) } } @Test @@ -57,7 +59,7 @@ class KamelConfigBuilderTest { builder.uriMapper() assertTrue { builder.mappers.size == 1 } - assertTrue { builder.mappers.contains(URIMapper) } + assertTrue { builder.mappers.contains>(URIMapper) } } @Test @@ -80,9 +82,9 @@ class KamelConfigBuilderTest { } builder.takeFrom(configBuilder) - assertTrue { builder.fetchers.contains(FileFetcher) } - assertTrue { builder.mappers.contains(URIMapper) } - assertTrue { builder.mappers.contains(StringMapper) } + assertTrue { builder.fetchers.contains>(FileFetcher) } + assertTrue { builder.mappers.contains>(URIMapper) } + assertTrue { builder.mappers.contains>(StringMapper) } assertEquals(100, builder.build().imageBitmapCache.maxSize) } @@ -96,9 +98,9 @@ class KamelConfigBuilderTest { } builder.takeFrom(configBuilder.build()) - assertTrue { builder.fetchers.contains(FileFetcher) } - assertTrue { builder.mappers.contains(URIMapper) } - assertTrue { builder.mappers.contains(StringMapper) } + assertTrue { builder.fetchers.contains>(FileFetcher) } + assertTrue { builder.mappers.contains>(URIMapper) } + assertTrue { builder.mappers.contains>(StringMapper) } assertEquals(100, builder.build().imageBitmapCache.maxSize) } diff --git a/kamel-image/build.gradle.kts b/kamel-image/build.gradle.kts index ecff6a40..708dd54e 100644 --- a/kamel-image/build.gradle.kts +++ b/kamel-image/build.gradle.kts @@ -10,19 +10,18 @@ plugins { } android { - compileSdkVersion(30) + compileSdk = 30 defaultConfig { - minSdkVersion(21) - targetSdkVersion(30) - versionCode = 1 - versionName = "1.0" + minSdk = 21 + targetSdk = 30 } compileOptions { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 } + testOptions { unitTests { isIncludeAndroidResources = true diff --git a/settings.gradle.kts b/settings.gradle.kts index 1ef81fc6..77fcf394 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -5,7 +5,6 @@ pluginManagement { maven { url = uri("https://maven.pkg.jetbrains.space/public/p/compose/dev") } } } -enableFeaturePreview("GRADLE_METADATA") rootProject.name = "Kamel"