Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/compilation-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@ 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: Check build
run: ./gradlew detekt build publishToMavenLocal
java-version: 11
- name: Build and publish local
run: ./gradlew build publishToMavenLocal syncMultiPlatformLibraryDebugFrameworkIosX64
- name: Install pods
run: cd sample/ios-app && pod install
- name: Check iOS
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
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +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
java-version: 11
- name: Publish
run: ./gradlew publish

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
24 changes: 4 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
![moko-errors](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/errors) ](https://repo1.maven.org/maven2/dev/icerock/moko/errors) ![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/errors) ](https://repo1.maven.org/maven2/dev/icerock/moko/errors) ![kotlin-version](https://kotlin-version.aws.icerock.dev/kotlin-version?group=dev.icerock.moko&name=errors)
# Mobile Kotlin errors
This is a Kotlin MultiPlatform library that provides automatic exception handling and
automatic error displaying to a screen.

## Table of Contents
- [Features](#features)
- [Requirements](#requirements)
- [Versions](#versions)
- [Installation](#installation)
- [Usage](#usage)
- [Samples](#samples)
Expand All @@ -29,23 +27,9 @@ on the platforms. Converts the exception class to an error object to display. Th
`SelectorErrorPresenter` - for selecting error presenter by some custom condition.

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

## Versions
### Bintray
- kotlin 1.3.72
- 0.1.0
- 0.2.0
- 0.2.1
- kotlin 1.4.0
- 0.3.0
- kotlin 1.4.21
- 0.3.1
### mavenCentral
- kotlin 1.4.31
- 0.3.2
- iOS version 11.0+

## Installation
root build.gradle
Expand All @@ -60,7 +44,7 @@ allprojects {
project build.gradle
```groovy
dependencies {
commonMainApi("dev.icerock.moko:errors:0.3.2")
commonMainApi("dev.icerock.moko:errors:0.4.0")
}
```

Expand Down
41 changes: 7 additions & 34 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,47 +11,20 @@ buildscript {
}

dependencies {
plugin(Deps.Plugins.mokoResources)
}
}
classpath("dev.icerock.moko:resources-generator:0.16.0")

plugins {
plugin(Deps.Plugins.detekt).apply(false)
classpath(":errors-build-logic")
}
}

allprojects {
repositories {
mavenCentral()
google()

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

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

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

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

dependencies {
"detektPlugins"(Deps.Libs.Detekt.detektFormatting)
}
}

tasks.register("clean", Delete::class).configure {
Expand Down
24 changes: 0 additions & 24 deletions buildSrc/build.gradle.kts

This file was deleted.

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

This file was deleted.

17 changes: 17 additions & 0 deletions errors-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 errors-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())
}
Loading