Skip to content

Commit

Permalink
Merge pull request #148 from icerockdev/develop
Browse files Browse the repository at this point in the history
Release 0.11.0
  • Loading branch information
Alex009 committed Jun 27, 2021
2 parents 3b3f418 + be33b2f commit 8af3cf1
Show file tree
Hide file tree
Showing 43 changed files with 696 additions and 634 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/compilation-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,16 @@ jobs:

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
- name: Build K/N cache
run: ./gradlew :mvvm:runCommonizer
java-version: 11
- name: Build and test
run: ./gradlew build publishToMavenLocal syncMultiPlatformLibraryDebugFrameworkIosX64 -x linkMultiPlatformLibraryDebugFrameworkIosArm64 -x linkMultiPlatformLibraryReleaseFrameworkIosArm64 -x linkMultiPlatformLibraryReleaseFrameworkIosX64
run: ./gradlew build publishToMavenLocal
- name: Install pods
run: cd sample/ios-app && pod install
- name: build ios sample
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 && xcodebuild -scheme TestProj -workspace TestProj.xcworkspace -configuration Debug -sdk iphonesimulator -arch x86_64 build CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO | xcpretty
- name: Publish Test Report
uses: mikepenz/action-junit-report@v2
if: ${{ always() }}
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@ jobs:

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
- name: Build K/N cache
run: ./gradlew :mvvm:runCommonizer
java-version: 11
- name: Build and publish to mavenCentral
run: ./gradlew publish
release:
Expand All @@ -42,6 +40,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
2 changes: 1 addition & 1 deletion MultiPlatformLibraryMvvm.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = 'MultiPlatformLibraryMvvm'
spec.version = '0.9.1'
spec.version = '0.11.0'
spec.homepage = 'https://github.com/icerockdev/moko-mvvm'
spec.source = { :git => "https://github.com/icerockdev/moko-mvvm.git", :tag => "release/#{spec.version}" }
spec.authors = 'IceRock Development'
Expand Down
60 changes: 16 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
![moko-mvvm](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/mvvm) ](https://repo1.maven.org/maven2/dev/icerock/moko/mvvm) ![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/mvvm-core) ](https://repo1.maven.org/maven2/dev/icerock/moko/mvvm-core) ![kotlin-version](https://kotlin-version.aws.icerock.dev/kotlin-version?group=dev.icerock.moko&name=mvvm-core)

# Mobile Kotlin Model-View-ViewModel architecture components
This is a Kotlin Multiplatform library that provides architecture components of Model-View-ViewModel
Expand All @@ -8,7 +8,6 @@ This is a Kotlin Multiplatform library that provides architecture components of
## Table of Contents
- [Features](#features)
- [Requirements](#requirements)
- [Versions](#versions)
- [Installation](#installation)
- [Documentation](#documentation)
- [Usage](#usage)
Expand All @@ -24,36 +23,9 @@ This is a Kotlin Multiplatform library that provides architecture components of
- **DataBinding, ViewBinding support** - integrate to android app with commonly used tools.

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

## Versions
### Bintray
- kotlin 1.3.50
- 0.1.0
- 0.2.0
- 0.3.0
- 0.3.1
- kotlin 1.3.61
- 0.4.0
- 0.5.0
- kotlin 1.3.70
- 0.6.0
- kotlin 1.3.72
- 0.7.0
- 0.7.1
- kotlin 1.4.0
- 0.8.0
- kotlin 1.4.21
- 0.8.1
- 0.9.0
- 0.9.1
### mavenCentral
- kotlin 1.4.31
- 0.9.2
- 0.10.0
- 0.10.1
- iOS version 11.0+

## Installation
root build.gradle
Expand All @@ -68,17 +40,17 @@ allprojects {
project build.gradle
```groovy
dependencies {
commonMainApi("dev.icerock.moko:mvvm-core:0.10.1") // only ViewModel, EventsDispatcher, Dispatchers.UI
commonMainApi("dev.icerock.moko:mvvm-livedata:0.10.1") // api mvvm-core, LiveData and extensions
commonMainApi("dev.icerock.moko:mvvm-state:0.10.1") // api mvvm-livedata, ResourceState class and extensions
commonMainApi("dev.icerock.moko:mvvm-core:0.11.0") // only ViewModel, EventsDispatcher, Dispatchers.UI
commonMainApi("dev.icerock.moko:mvvm-livedata:0.11.0") // api mvvm-core, LiveData and extensions
commonMainApi("dev.icerock.moko:mvvm-state:0.11.0") // api mvvm-livedata, ResourceState class and extensions
androidMainApi("dev.icerock.moko:mvvm-livedata-material:0.10.1") // api mvvm-livedata, Material library android extensions
androidMainApi("dev.icerock.moko:mvvm-livedata-glide:0.10.1") // api mvvm-livedata, Glide library android extensions
androidMainApi("dev.icerock.moko:mvvm-livedata-swiperefresh:0.10.1") // api mvvm-livedata, SwipeRefreshLayout library android extensions
androidMainApi("dev.icerock.moko:mvvm-databinding:0.10.1") // api mvvm-livedata, DataBinding support for Android
androidMainApi("dev.icerock.moko:mvvm-viewbinding:0.10.1") // api mvvm-livedata, ViewBinding support for Android
androidMainApi("dev.icerock.moko:mvvm-livedata-material:0.11.0") // api mvvm-livedata, Material library android extensions
androidMainApi("dev.icerock.moko:mvvm-livedata-glide:0.11.0") // api mvvm-livedata, Glide library android extensions
androidMainApi("dev.icerock.moko:mvvm-livedata-swiperefresh:0.11.0") // api mvvm-livedata, SwipeRefreshLayout library android extensions
androidMainApi("dev.icerock.moko:mvvm-databinding:0.11.0") // api mvvm-livedata, DataBinding support for Android
androidMainApi("dev.icerock.moko:mvvm-viewbinding:0.11.0") // api mvvm-livedata, ViewBinding support for Android
commonTestImplementation("dev.icerock.moko:mvvm-test:0.10.1") // test utilities
commonTestImplementation("dev.icerock.moko:mvvm-test:0.11.0") // test utilities
}
```

Expand All @@ -88,17 +60,17 @@ kotlin {
// export correct artifact to use all classes of library directly from Swift
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("dev.icerock.moko:mvvm-core:0.10.1")
export("dev.icerock.moko:mvvm-livedata:0.10.1")
export("dev.icerock.moko:mvvm-state:0.10.1")
export("dev.icerock.moko:mvvm-core:0.11.0")
export("dev.icerock.moko:mvvm-livedata:0.11.0")
export("dev.icerock.moko:mvvm-state:0.11.0")
}
}
}
```

On iOS, in addition to the Kotlin library add in Podfile
```ruby
pod 'MultiPlatformLibraryMvvm', :git => 'https://github.com/icerockdev/moko-mvvm.git', :tag => 'release/0.10.1'
pod 'MultiPlatformLibraryMvvm', :git => 'https://github.com/icerockdev/moko-mvvm.git', :tag => 'release/0.11.0'
```
**`MultiPlatformLibraryMvvm` CocoaPod requires that the framework compiled from Kotlin be named
`MultiPlatformLibrary` and be connected as a CocoaPod `MultiPlatformLibrary`.
Expand Down
111 changes: 9 additions & 102 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,124 +2,31 @@
* Copyright 2019 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license.
*/

import java.util.Base64

plugins {
plugin(Deps.Plugins.detekt) apply false
plugin(Deps.Plugins.dokka) apply false
id("org.jetbrains.kotlinx.binary-compatibility-validator") version "0.5.0"
}

buildscript {
repositories {
gradlePluginPortal()
}
}

allprojects {
repositories {
mavenCentral()
google()
mavenCentral()

jcenter {
content {
includeGroup("org.jetbrains.trove4j")
includeModule("org.jetbrains.kotlinx", "kotlinx-html-jvm")
}
}
}

apply(plugin = Deps.Plugins.detekt.id)
apply(plugin = Deps.Plugins.dokka.id)

configure<io.gitlab.arturbosch.detekt.extensions.DetektExtension> {
input.setFrom(
"src/commonMain/kotlin",
"src/androidMain/kotlin",
"src/iosMain/kotlin",
"src/main/kotlin"
)
gradlePluginPortal()
}

dependencies {
"detektPlugins"(Deps.Libs.Jvm.detektFormatting)
}
classpath("org.jetbrains.dokka:dokka-gradle-plugin:1.4.20")

plugins.withId(Deps.Plugins.androidLibrary.id) {
configure<com.android.build.gradle.LibraryExtension> {
compileSdkVersion(Deps.Android.compileSdk)

defaultConfig {
minSdkVersion(Deps.Android.minSdk)
targetSdkVersion(Deps.Android.targetSdk)
}
}
classpath(":mvvm-build-logic")
}
}

plugins.withId(Deps.Plugins.mavenPublish.id) {
group = "dev.icerock.moko"
version = Deps.mokoMvvmVersion

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

configure<PublishingExtension> {
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> {
// Stub javadoc.jar artifact
artifact(javadocJar.get())

// Provide artifacts information requited by Maven Central
pom {
name.set("MOKO mvvm")
description.set("Model-View-ViewModel architecture components for mobile (android & ios) Kotlin Multiplatform development")
url.set("https://github.com/icerockdev/moko-mvvm")
licenses {
license {
url.set("https://github.com/icerockdev/moko-mvvm/blob/master/LICENSE.md")
}
}

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

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

apply(plugin = Deps.Plugins.signing.id)
allprojects {
apply(plugin = "org.jetbrains.dokka")

configure<SigningExtension> {
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(publications)
}
}
}
plugins.withId("org.gradle.maven-publish") {
group = "dev.icerock.moko"
version = libs.versions.mokoMvvmVersion.get()
}
}

Expand Down
24 changes: 0 additions & 24 deletions buildSrc/build.gradle.kts

This file was deleted.

Loading

0 comments on commit 8af3cf1

Please sign in to comment.