Skip to content

Commit

Permalink
Merge pull request #22 from anton6tak/#21-update-gradle-and-kotlin-ve…
Browse files Browse the repository at this point in the history
…rsions

#21 update gradle and kotlin versions
  • Loading branch information
Alex009 authored Jun 8, 2021
2 parents 8da241e + 830d25f commit 5b9a661
Show file tree
Hide file tree
Showing 14 changed files with 71 additions and 141 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/compilation-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,9 @@ jobs:
java-version: 1.8
- 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
if: matrix.os == 'macOS-latest'
24 changes: 3 additions & 21 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://img.shields.io/maven-central/v/dev.icerock.moko/moko-graphics) ](https://repo1.maven.org/maven2/dev/icerock/moko/moko-graphics) ![kotlin-version](https://img.shields.io/badge/kotlin-1.4.31-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://img.shields.io/badge/kotlin-1.5.10-orange)

# Mobile Kotlin graphics
This is a Kotlin Multiplatform library that provides graphics primitives to common code.
Expand All @@ -24,24 +24,6 @@ This is a Kotlin Multiplatform library that provides graphics primitives to comm
- Android API 16+
- iOS version 9.0+

## Versions
### Bintray
- kotlin 1.3.50
- 0.1.0
- kotlin 1.3.60
- 0.2.0
- kotlin 1.3.70
- 0.3.0
- kotlin 1.4.0
- 0.4.0
- kotlin 1.4.20
- 0.5.0
- kotlin 1.4.21
- 0.6.0
### mavenCentral
- kotlin 1.4.31
- 0.6.1

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

Expand Down Expand Up @@ -101,4 +83,4 @@ For more details on contributing please see the [contributing guide](CONTRIBUTIN
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
25 changes: 15 additions & 10 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@
/*
* Copyright 2019 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license.
*/
buildscript {
repositories {
mavenCentral()
google()
}
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")
}
}

allprojects {
repositories {
mavenCentral()
google()

jcenter {
content {
includeGroup("org.jetbrains.trove4j")
}
}
}

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

defaultConfig {
minSdkVersion(Deps.Android.minSdk)
targetSdkVersion(Deps.Android.targetSdk)
minSdkVersion(libs.versions.minSdk.get().toInt())
targetSdkVersion(libs.versions.targetSdk.get().toInt())
}
}
}
Expand Down
24 changes: 0 additions & 24 deletions buildSrc/build.gradle.kts

This file was deleted.

43 changes: 0 additions & 43 deletions buildSrc/src/main/kotlin/Deps.kt

This file was deleted.

4 changes: 4 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ org.gradle.configureondemand=false
org.gradle.parallel=true

kotlin.code.style=official

kotlin.mpp.stability.nowarn=true
kotlin.mpp.enableGranularSourceSetsMetadata=true
kotlin.mpp.enableCompatibilityMetadataVariant=true
kotlin.native.enableDependencyPropagation=false

android.useAndroidX=true

mobile.multiplatform.iosTargetWarning=false
13 changes: 13 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[versions]
androidAppCompatVersion = "1.2.0"
androidAnnotationVersion = "1.1.0"
mokoGraphicsVersion = "0.7.0"
compileSdk = "28"
targetSdk = "28"
minSdk = "16"

[libraries]
appCompat = { module = "androidx.appcompat:appcompat", version.ref = "androidAppCompatVersion" }
annotation = { module = "androidx.annotation:annotation", version.ref = "androidAppCompatVersion" }
mokoGraphics = { module = "dev.icerock.moko:graphics", version.ref = "mokoGraphicsVersion" }

2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
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
16 changes: 8 additions & 8 deletions graphics/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@ import java.util.Base64
import kotlin.text.String

plugins {
plugin(Deps.Plugins.androidLibrary)
plugin(Deps.Plugins.kotlinMultiPlatform)
plugin(Deps.Plugins.mobileMultiPlatform)
plugin(Deps.Plugins.mavenPublish)
plugin(Deps.Plugins.signing)
id("com.android.library")
id("org.jetbrains.kotlin.multiplatform")
id("dev.icerock.mobile.multiplatform")
id("maven-publish")
id("signing")
}

group = "dev.icerock.moko"
version = Deps.mokoGraphicsVersion
version = libs.versions.mokoGraphicsVersion.get()

dependencies {
androidMainImplementation(Deps.Libs.Android.annotation)
"androidMainImplementation"(libs.annotation)
}

kotlin {
macosX64()
tvos()
watchos()
jvm()
js {
js(BOTH) {
nodejs()
browser()
}
Expand Down
14 changes: 7 additions & 7 deletions sample/android-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
*/

plugins {
plugin(Deps.Plugins.androidApplication)
plugin(Deps.Plugins.kotlinAndroid)
id("com.android.application")
id("kotlin-android")
}

android {
compileSdkVersion(Deps.Android.compileSdk)
compileSdkVersion(libs.versions.compileSdk.get().toInt())

dexOptions {
javaMaxHeapSize = "2g"
}

defaultConfig {
minSdkVersion(Deps.Android.minSdk)
targetSdkVersion(Deps.Android.targetSdk)
minSdkVersion(libs.versions.minSdk.get().toInt())
targetSdkVersion(libs.versions.targetSdk.get().toInt())

applicationId = "dev.icerock.moko.samples.graphics"

Expand All @@ -43,7 +43,7 @@ android {
}

dependencies {
implementation(Deps.Libs.Android.appCompat)
implementation(libs.appCompat)

implementation(project(":sample:mpp-library"))
implementation(projects.sample.mppLibrary)
}
18 changes: 0 additions & 18 deletions sample/build.gradle.kts

This file was deleted.

2 changes: 1 addition & 1 deletion sample/ios-app/Podfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source 'https://github.com/CocoaPods/Specs.git'
source 'https://cdn.cocoapods.org/'

# ignore all warnings from all pods
inhibit_all_warnings!
Expand Down
18 changes: 10 additions & 8 deletions sample/mpp-library/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,22 @@
*/

plugins {
plugin(Deps.Plugins.androidLibrary)
plugin(Deps.Plugins.kotlinMultiPlatform)
plugin(Deps.Plugins.mobileMultiPlatform)
plugin(Deps.Plugins.appleFramework)
id("com.android.library")
id("org.jetbrains.kotlin.multiplatform")
id("dev.icerock.mobile.multiplatform")
id("dev.icerock.mobile.multiplatform.apple-framework")
}

kotlin {
macosX64()
targets.withType(org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget::class.java).all {
binaries.withType(org.jetbrains.kotlin.gradle.plugin.mpp.Framework::class.java).all {
export(projects.graphics)
}
}
}

dependencies {
commonMainApi(Deps.Libs.MultiPlatform.mokoGraphics.common)
commonMainApi(projects.graphics)
}

framework {
export(Deps.Libs.MultiPlatform.mokoGraphics)
}
3 changes: 3 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
* Copyright 2019 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license.
*/

enableFeaturePreview("VERSION_CATALOGS")
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")

include(":graphics")
include(":sample:android-app")
include(":sample:mpp-library")

0 comments on commit 5b9a661

Please sign in to comment.