Skip to content

Commit

Permalink
Merge pull request #16 from icerockdev/develop
Browse files Browse the repository at this point in the history
Release 0.6.0
  • Loading branch information
Alex009 authored Jan 18, 2021
2 parents 1110320 + b51e938 commit f235aea
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 32 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/compilation-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ on:

jobs:
build:
runs-on: macOS-latest

runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ on:

jobs:
build:
runs-on: macOS-latest

runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Publish
run: ./gradlew publishAllPublicationsToBintrayRepository -DBINTRAY_USER=${{ secrets.BINTRAY_USER }} -DBINTRAY_KEY=${{ secrets.BINTRAY_KEY }}
run: ./gradlew publishAllPublicationsToBintrayRepository -DBINTRAY_USER=${{ secrets.BINTRAY_USER }} -DBINTRAY_KEY=${{ secrets.BINTRAY_KEY }} -DIS_MAIN_HOST=${{ matrix.os == 'ubuntu-latest' }}
9 changes: 6 additions & 3 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-graphics/images/download.svg) ](https://bintray.com/icerockdev/moko/moko-graphics/_latestVersion) ![kotlin-version](https://img.shields.io/badge/kotlin-1.4.20-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.4.21-orange)

# Mobile Kotlin graphics
This is a Kotlin Multiplatform library that provides graphics primitives to common code.
Expand All @@ -16,7 +16,8 @@ This is a Kotlin Multiplatform library that provides graphics primitives to comm
- [License](#license)

## Features
- **Color** converting according to the platform-side requirements (argb/rgba).
- **Color** converting according to the platform-side requirements (argb/rgba);
- All Kotlin Multiplatform targets support.

## Requirements
- Gradle version 6.0+
Expand All @@ -34,6 +35,8 @@ This is a Kotlin Multiplatform library that provides graphics primitives to comm
- 0.4.0
- kotlin 1.4.20
- 0.5.0
- kotlin 1.4.21
- 0.6.0

## Installation
root build.gradle
Expand All @@ -48,7 +51,7 @@ allprojects {
project build.gradle
```groovy
dependencies {
commonMainApi("dev.icerock.moko:graphics:0.5.0")
commonMainApi("dev.icerock.moko:graphics:0.6.0")
}
```

Expand Down
16 changes: 0 additions & 16 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,6 @@
* Copyright 2019 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license.
*/

buildscript {
repositories {
jcenter()
google()
}

dependencies {
plugin(Deps.Plugins.androidExtensions)
}
}

allprojects {
repositories {
google()
Expand All @@ -34,8 +23,3 @@ allprojects {
}
}
}

tasks.register("clean", Delete::class).configure {
group = "build"
delete(rootProject.buildDir)
}
4 changes: 2 additions & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

plugins {
id("org.jetbrains.kotlin.jvm") version("1.4.20")
id("org.jetbrains.kotlin.jvm") version("1.4.21")
}

repositories {
Expand All @@ -15,6 +15,6 @@ repositories {

dependencies {
implementation("dev.icerock:mobile-multiplatform:0.9.0")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.20")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.21")
implementation("com.android.tools.build:gradle:4.1.1")
}
8 changes: 2 additions & 6 deletions buildSrc/src/main/kotlin/Deps.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
*/

object Deps {
private const val kotlinVersion = "1.4.20"
private const val kotlinVersion = "1.4.21"

private const val androidAppCompatVersion = "1.2.0"
private const val androidAnnotationVersion = "1.1.0"

const val mokoGraphicsVersion = "0.5.0"
const val mokoGraphicsVersion = "0.6.0"

object Android {
const val compileSdk = 28
Expand All @@ -17,10 +17,6 @@ object Deps {
}

object Plugins {
val androidExtensions = GradlePlugin(
id = "kotlin-android-extensions",
module = "org.jetbrains.kotlin:kotlin-android-extensions:$kotlinVersion"
)
val androidLibrary = GradlePlugin(id = "com.android.library")
val androidApplication = GradlePlugin(id = "com.android.application")
val kotlinMultiPlatform = GradlePlugin(id = "org.jetbrains.kotlin.multiplatform")
Expand Down
45 changes: 45 additions & 0 deletions graphics/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,29 @@ dependencies {

kotlin {
macosX64()
tvos()
watchos()
jvm()
js {
nodejs()
browser()
}
linux()
windows()
wasm32()
}

fun org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension.linux() {
linuxArm64()
linuxArm32Hfp()
linuxMips32()
linuxMipsel32()
linuxX64()
}

fun org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension.windows() {
mingwX64()
mingwX86()
}

publishing {
Expand All @@ -29,4 +52,26 @@ publishing {
password = System.getProperty("BINTRAY_KEY")
}
}

// Make sure to avoid duplicate publications
val publicationsFromMainHost = listOf(
"wasm32",
"jvm",
"js",
"kotlinMultiplatform",
"androidRelease",
"androidDebug",
"linuxArm64",
"linuxArm32Hfp",
"linuxX64"
)

publications
.matching { it.name in publicationsFromMainHost }
.all {
val targetPublication = this@all
tasks.withType<AbstractPublishToMaven>()
.matching { it.publication == targetPublication }
.all { onlyIf { System.getProperty("IS_MAIN_HOST") == "true" } }
}
}

0 comments on commit f235aea

Please sign in to comment.