Skip to content

Commit

Permalink
Merge pull request #27 from icerockdev/develop
Browse files Browse the repository at this point in the history
Release 0.8.0
  • Loading branch information
anton6tak authored Jul 6, 2021
2 parents 3d6ecfc + 420639f commit ad224f9
Show file tree
Hide file tree
Showing 20 changed files with 297 additions and 178 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/compilation-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 1.8
java-version: 11
- name: Check build
run: ./gradlew build publishToMavenLocal
- name: Install pods
run: cd sample/ios-app && pod install
if: matrix.os == 'macOS-latest'
- name: Check iOS
run: cd sample/ios-app && xcodebuild -scheme TestProj -workspace TestProj.xcworkspace -configuration Debug build CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
run: cd sample/ios-app && set -o pipefail && xcodebuild -scheme TestProj -workspace TestProj.xcworkspace -configuration Debug -sdk iphonesimulator -arch x86_64 build CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO | xcpretty
if: matrix.os == 'macOS-latest'
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 1.8
java-version: 11
- name: Publish
run: ./gradlew publish -DIS_MAIN_HOST=${{ matrix.os == 'ubuntu-latest' }}
release:
Expand All @@ -41,6 +41,6 @@ jobs:
with:
commitish: ${{ github.ref }}
tag_name: release/${{ github.event.inputs.version }}
release_name: Release ${{ github.event.inputs.version }}
release_name: ${{ github.event.inputs.version }}
body: "Will be filled later"
draft: true
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
![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://img.shields.io/maven-central/v/dev.icerock.moko/graphics) ](https://repo1.maven.org/maven2/dev/icerock/moko/graphics/) ![kotlin-version](https://img.shields.io/badge/kotlin-1.5.10-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://img.shields.io/maven-central/v/dev.icerock.moko/graphics) ](https://repo1.maven.org/maven2/dev/icerock/moko/graphics) ![kotlin-version](https://kotlin-version.aws.icerock.dev/kotlin-version?group=dev.icerock.moko&name=graphics)

# Mobile Kotlin graphics
This is a Kotlin Multiplatform library that provides graphics primitives to common code.

## Table of Contents
- [Features](#features)
- [Requirements](#requirements)
- [Versions](#versions)
- [Installation](#installation)
- [Usage](#usage)
- [Samples](#samples)
Expand All @@ -20,9 +19,9 @@ This is a Kotlin Multiplatform library that provides graphics primitives to comm
- All Kotlin Multiplatform targets support.

## Requirements
- Gradle version 6.0+
- Gradle version 6.8+
- Android API 16+
- iOS version 9.0+
- iOS version 11.0+

## Installation
root build.gradle
Expand All @@ -37,7 +36,7 @@ allprojects {
project build.gradle
```groovy
dependencies {
commonMainApi("dev.icerock.moko:graphics:0.7.0")
commonMainApi("dev.icerock.moko:graphics:0.8.0")
}
```

Expand Down
22 changes: 5 additions & 17 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,16 @@ buildscript {
repositories {
mavenCentral()
google()
gradlePluginPortal()
}
dependencies {
classpath("dev.icerock:mobile-multiplatform:0.9.2")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.10")
classpath("com.android.tools.build:gradle:4.2.1")
classpath(":graphics-build-logic")
}
}

allprojects {
repositories {
mavenCentral()
google()
}

plugins.withId("com.android.library") {
configure<com.android.build.gradle.LibraryExtension> {
compileSdkVersion(libs.versions.compileSdk.get().toInt())

defaultConfig {
minSdkVersion(libs.versions.minSdk.get().toInt())
targetSdkVersion(libs.versions.targetSdk.get().toInt())
}
}
plugins.withId("org.gradle.maven-publish") {
group = "dev.icerock.moko"
version = libs.versions.mokoGraphicsVersion.get()
}
}
5 changes: 1 addition & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
[versions]
androidAppCompatVersion = "1.2.0"
androidAnnotationVersion = "1.1.0"
mokoGraphicsVersion = "0.7.0"
compileSdk = "28"
targetSdk = "28"
minSdk = "16"
mokoGraphicsVersion = "0.8.0"

[libraries]
appCompat = { module = "androidx.appcompat:appcompat", version.ref = "androidAppCompatVersion" }
Expand Down
17 changes: 17 additions & 0 deletions graphics-build-logic/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
plugins {
`kotlin-dsl`
}

repositories {
mavenCentral()
google()

gradlePluginPortal()
}

dependencies {
api("dev.icerock:mobile-multiplatform:0.12.0")
api("org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.20")
api("com.android.tools.build:gradle:4.2.1")
api("io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.15.0")
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Copyright 2021 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license.
*/

plugins {
id("com.android.application")
id("android-base-convention")
id("kotlin-android")
}

android {
dexOptions {
javaMaxHeapSize = "2g"
}

buildTypes {
getByName("release") {
isMinifyEnabled = true
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
}
getByName("debug") {
isDebuggable = true
applicationIdSuffix = ".debug"
}
}

packagingOptions {
exclude("META-INF/*.kotlin_module")
exclude("META-INF/AL2.0")
exclude("META-INF/LGPL2.1")
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* Copyright 2021 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license.
*/

import com.android.build.gradle.BaseExtension

configure<BaseExtension> {
compileSdkVersion(30)

defaultConfig {
minSdkVersion(16)
targetSdkVersion(30)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* Copyright 2021 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license.
*/

plugins {
id("com.android.library")
id("kotlin-android")
id("android-base-convention")
}

android {
sourceSets.all { java.srcDir("src/$name/kotlin") }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* Copyright 2021 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license.
*/

plugins {
id("publication-convention")
}

afterEvaluate {
publishing.publications {
create("release", MavenPublication::class.java) {
from(components.getByName("release"))
}
}
}
15 changes: 15 additions & 0 deletions graphics-build-logic/src/main/kotlin/detekt-convention.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* Copyright 2021 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license.
*/

plugins {
id("io.gitlab.arturbosch.detekt")
}

detekt {
input.setFrom("src/commonMain/kotlin", "src/androidMain/kotlin", "src/iosMain/kotlin", "src/main/kotlin")
}

dependencies {
"detektPlugins"("io.gitlab.arturbosch.detekt:detekt-formatting:1.15.0")
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Copyright 2021 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license.
*/

plugins {
id("org.gradle.maven-publish")
}

val javadocJar by tasks.registering(Jar::class) {
archiveClassifier.set("javadoc")
}

publishing.publications.withType<MavenPublication> {
// Stub javadoc.jar artifact
artifact(javadocJar.get())
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* Copyright 2021 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license.
*/

plugins {
id("com.android.library")
id("org.jetbrains.kotlin.multiplatform")
id("android-base-convention")
id("dev.icerock.mobile.multiplatform.android-manifest")
}

kotlin {
ios()
android {
publishLibraryVariants("release", "debug")
}
macosX64()
tvos()
watchos()
jvm()
js(BOTH) {
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()
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/*
* Copyright 2021 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license.
*/

import java.util.Base64

plugins {
id("javadoc-stub-convention")
id("org.gradle.maven-publish")
id("signing")
}

publishing {
repositories.maven("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") {
name = "OSSRH"

credentials {
username = System.getenv("OSSRH_USER")
password = System.getenv("OSSRH_KEY")
}
}

publications.withType<MavenPublication> {
// Provide artifacts information requited by Maven Central
pom {
name.set("MOKO graphics")
description.set("Graphics primitives for mobile (android & ios) Kotlin Multiplatform development")
url.set("https://github.com/icerockdev/moko-graphics")
licenses {
license {
name.set("Apache-2.0")
distribution.set("repo")
url.set("https://github.com/icerockdev/moko-graphics/blob/master/LICENSE.md")
}
}

developers {
developer {
id.set("Alex009")
name.set("Aleksey Mikhailov")
email.set("[email protected]")
}
developer {
id.set("nrobi144")
name.set("Nagy Robert")
email.set("[email protected]")
}
}

scm {
connection.set("scm:git:ssh://github.com/icerockdev/moko-graphics.git")
developerConnection.set("scm:git:ssh://github.com/icerockdev/moko-graphics.git")
url.set("https://github.com/icerockdev/moko-graphics")
}
}
}
}


signing {
val signingKeyId: String? = System.getenv("SIGNING_KEY_ID")
val signingPassword: String? = System.getenv("SIGNING_PASSWORD")
val signingKey: String? = System.getenv("SIGNING_KEY")?.let { base64Key ->
String(Base64.getDecoder().decode(base64Key))
}
if (signingKeyId != null) {
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
sign(publishing.publications)
}
}
Loading

0 comments on commit ad224f9

Please sign in to comment.