From f3ea767bd6aba11ee3dde96e693fdbeebdbae866 Mon Sep 17 00:00:00 2001 From: nrobi144 Date: Mon, 18 Jan 2021 08:57:53 +0200 Subject: [PATCH 1/3] Update kotlin version to "1.4.21" --- buildSrc/build.gradle.kts | 4 ++-- buildSrc/src/main/kotlin/Deps.kt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 3ab04ff..2e82fdf 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -3,7 +3,7 @@ */ plugins { - id("org.jetbrains.kotlin.jvm") version("1.4.20") + id("org.jetbrains.kotlin.jvm") version("1.4.21") } repositories { @@ -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") } diff --git a/buildSrc/src/main/kotlin/Deps.kt b/buildSrc/src/main/kotlin/Deps.kt index dcf550d..25572b9 100755 --- a/buildSrc/src/main/kotlin/Deps.kt +++ b/buildSrc/src/main/kotlin/Deps.kt @@ -3,7 +3,7 @@ */ 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" From d23acede8102accb21385e8b606aea0e654535b8 Mon Sep 17 00:00:00 2001 From: nrobi144 Date: Mon, 18 Jan 2021 08:58:43 +0200 Subject: [PATCH 2/3] Add all kotlin targets --- .github/workflows/compilation-check.yml | 6 ++-- .github/workflows/publish.yml | 8 +++-- build.gradle.kts | 5 --- graphics/build.gradle.kts | 45 +++++++++++++++++++++++++ 4 files changed, 54 insertions(+), 10 deletions(-) diff --git a/.github/workflows/compilation-check.yml b/.github/workflows/compilation-check.yml index 50c0b8e..15b8eae 100644 --- a/.github/workflows/compilation-check.yml +++ b/.github/workflows/compilation-check.yml @@ -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 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index afe5691..13ce4c1 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -6,8 +6,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 @@ -15,4 +17,4 @@ jobs: 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' }} diff --git a/build.gradle.kts b/build.gradle.kts index f60a1dc..9f5a228 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -34,8 +34,3 @@ allprojects { } } } - -tasks.register("clean", Delete::class).configure { - group = "build" - delete(rootProject.buildDir) -} diff --git a/graphics/build.gradle.kts b/graphics/build.gradle.kts index d2b6f28..7efefa6 100644 --- a/graphics/build.gradle.kts +++ b/graphics/build.gradle.kts @@ -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 { @@ -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() + .matching { it.publication == targetPublication } + .all { onlyIf { System.getProperty("IS_MAIN_HOST") == "true" } } + } } From b51e9383ef1d8f299786fc0eece1e5da43458046 Mon Sep 17 00:00:00 2001 From: Aleksey Mikhailov Date: Mon, 18 Jan 2021 15:34:28 +0700 Subject: [PATCH 3/3] up version --- README.md | 9 ++++++--- build.gradle.kts | 11 ----------- buildSrc/src/main/kotlin/Deps.kt | 6 +----- 3 files changed, 7 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 8e8918b..dcace3d 100755 --- a/README.md +++ b/README.md @@ -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. @@ -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+ @@ -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 @@ -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") } ``` diff --git a/build.gradle.kts b/build.gradle.kts index 9f5a228..4114c81 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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() diff --git a/buildSrc/src/main/kotlin/Deps.kt b/buildSrc/src/main/kotlin/Deps.kt index 25572b9..c0eec94 100755 --- a/buildSrc/src/main/kotlin/Deps.kt +++ b/buildSrc/src/main/kotlin/Deps.kt @@ -8,7 +8,7 @@ object Deps { 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 @@ -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")