Skip to content

Commit

Permalink
Merge pull request #31 from icerockdev/develop
Browse files Browse the repository at this point in the history
Release 0.7.1
  • Loading branch information
Alex009 authored Jun 30, 2021
2 parents 2ef4387 + 4490ac6 commit 558effb
Show file tree
Hide file tree
Showing 22 changed files with 326 additions and 213 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 && 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 @@ -23,10 +23,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 @@ -42,6 +42,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
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
![moko-parcelize](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/parcelize) ](https://repo1.maven.org/maven2/dev/icerock/moko/parcelize) ![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/parcelize) ](https://repo1.maven.org/maven2/dev/icerock/moko/parcelize) ![kotlin-version](https://kotlin-version.aws.icerock.dev/kotlin-version?group=dev.icerock.moko&name=parcelize)

# MOKO Parcelize
This is a Kotlin Multiplatform library that supports Parcelize in 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 supports Parcelize in common code.
- 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:parcelize:0.7.0")
commonMainApi("dev.icerock.moko:parcelize:0.7.1")
}
```

Expand All @@ -63,6 +62,7 @@ Please see more examples in the [sample directory](sample).
## Set Up Locally
- The [parcelize directory](parcelize) contains the `parcelize` library;
- The [sample directory](sample) contains sample apps for Android and iOS; plus the mpp-library connected to the apps.
- For publish to MavenLocal repository run `./gradlew publishToMavenLocal -DIS_MAIN_HOST=true`

## Contributing
All development (both new features and bug fixes) is performed in the `develop` branch. This way `master` always contains the sources of the most recently released version. Please send PRs with bug fixes to the `develop` branch. Documentation fixes in the markdown files are an exception to this rule. They are updated directly in `master`.
Expand Down
22 changes: 5 additions & 17 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,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(":parcelize-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.mokoParcelizeVersion.get()
}
}
10 changes: 3 additions & 7 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
[versions]
androidAppCompatVersion = "1.1.0"
mokoParcelizeVersion = "0.7.0"
compileSdk = "28"
targetSdk = "28"
minSdk = "16"
androidAppCompatVersion = "1.2.0"
mokoParcelizeVersion = "0.7.1"

[libraries]
appCompat = { module = "androidx.appcompat:appcompat", version.ref = "androidAppCompatVersion" }
mokoParcelize = { module = "dev.icerock.moko:parcelize", version.ref = "mokoParcelizeVersion" }
appCompat = { module = "androidx.appcompat:appcompat", version.ref = "androidAppCompatVersion" }
17 changes: 17 additions & 0 deletions parcelize-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 parcelize-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,63 @@
/*
* 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 {
android {
publishLibraryVariants("release", "debug")
}
ios()
macosX64("macOS")
tvos()
watchos()
jvm()
js(BOTH) {
nodejs()
browser()
}
linux()
windows()
wasm32()

sourceSets {
all {
languageSettings.apply {
useExperimentalAnnotation("kotlin.RequiresOptIn")
}
}

val commonMain by getting

val notAndroidMain by creating {
dependsOn(commonMain)
}

val intermediateSourceSets = listOf(commonMain, notAndroidMain)
matching { sourceSet ->
!sourceSet.name.startsWith("android") && sourceSet !in intermediateSourceSets
}.all {
dependsOn(notAndroidMain)
}
}
}

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

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

Loading

0 comments on commit 558effb

Please sign in to comment.