Skip to content

Commit

Permalink
Merge pull request #1 from icerockdev/develop
Browse files Browse the repository at this point in the history
update to kotlin 1.3.60
  • Loading branch information
Alex009 authored Nov 19, 2019
2 parents 7baf152 + 35a1777 commit 6bc678d
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 11 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
![moko-graphics](img/logo.png)
[![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](http://www.apache.org/licenses/LICENSE-2.0) [![Download](https://api.bintray.com/packages/icerockdev/moko/moko-core/images/download.svg) ](https://bintray.com/icerockdev/moko/moko-core/_latestVersion) ![kotlin-version](https://img.shields.io/badge/kotlin-1.3.50-orange)
[![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](http://www.apache.org/licenses/LICENSE-2.0) [![Download](https://api.bintray.com/packages/icerockdev/moko/moko-graphics/images/download.svg) ](https://bintray.com/icerockdev/moko/moko-graphics/_latestVersion) ![kotlin-version](https://img.shields.io/badge/kotlin-1.3.60-orange)

# Mobile Kotlin graphics
This is a Kotlin Multiplatform library that provides graphics primitives to common code.
Expand All @@ -26,6 +26,8 @@ This is a Kotlin Multiplatform library that provides graphics primitives to comm
## Versions
- kotlin 1.3.50
- 0.1.0
- kotlin 1.3.60
- 0.2.0

## Installation
root build.gradle
Expand All @@ -40,7 +42,7 @@ allprojects {
project build.gradle
```groovy
dependencies {
commonMainApi("dev.icerock.moko:graphics:0.1.0")
commonMainApi("dev.icerock.moko:graphics:0.2.0")
}
```

Expand Down
6 changes: 3 additions & 3 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ repositories {
}

dependencies {
implementation("dev.icerock:mobile-multiplatform:0.3.0")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50")
implementation("com.android.tools.build:gradle:3.5.0")
implementation("dev.icerock:mobile-multiplatform:0.4.0")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.60")
implementation("com.android.tools.build:gradle:3.5.2")
}

kotlinDslPluginOptions {
Expand Down
6 changes: 3 additions & 3 deletions buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ object Versions {
const val minSdk = 16
}

const val kotlin = "1.3.50"
const val kotlin = "1.3.60"

object Plugins {
const val kotlin = Versions.kotlin
Expand All @@ -18,12 +18,12 @@ object Versions {

object Libs {
object Android {
const val appCompat = "1.0.2"
const val appCompat = "1.1.0"
const val annotation = "1.1.0"
}

object MultiPlatform {
const val mokoGraphics: String = "0.1.0"
const val mokoGraphics: String = "0.2.0"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ import androidx.annotation.ColorInt

@ColorInt
fun Color.colorInt(): Int {
val maxColorValue: Int = 0xFF
return argb.toInt()
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,11 @@ data class Color(
green.toLong().shl(8) or
red.toLong().shl(16) or
alpha.toLong().shl(24)

constructor(colorRGBA: Long) : this(
red = (colorRGBA.shr(24) and 0xFF).toInt(),
green = (colorRGBA.shr(16) and 0xFF).toInt(),
blue = (colorRGBA.shr(8) and 0xFF).toInt(),
alpha = (colorRGBA.shr(0) and 0xFF).toInt()
)
}
11 changes: 9 additions & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ pluginManagement {

enableFeaturePreview("GRADLE_METADATA")

val properties = startParameter.projectProperties

// ./gradlew -PlibraryPublish publishToMavenLocal
val libraryPublish: Boolean = properties.containsKey("libraryPublish")

include(":graphics")
include(":sample:android-app")
include(":sample:mpp-library")
if(!libraryPublish) {
include(":sample:android-app")
include(":sample:mpp-library")
}

0 comments on commit 6bc678d

Please sign in to comment.