Skip to content

Commit

Permalink
Merge pull request #42 from anton6tak/#41-update-to-kotlin-1.5.10-and…
Browse files Browse the repository at this point in the history
…-gradle-0.7.2

#41 update to kotlin 1.5.10 and gradle 0.7.2
  • Loading branch information
Alex009 authored Jun 28, 2021
2 parents c5d0082 + e137682 commit f800970
Show file tree
Hide file tree
Showing 25 changed files with 300 additions and 290 deletions.
10 changes: 7 additions & 3 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
java-version: 11
- name: Build and publish local
run: ./gradlew build publishToMavenLocal
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
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ 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
Expand All @@ -40,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
31 changes: 6 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
![moko-permissions](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/permissions) ](https://repo1.maven.org/maven2/dev/icerock/moko/permissions) ![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/permissions) ](https://repo1.maven.org/maven2/dev/icerock/moko/permissions) ![kotlin-version](https://kotlin-version.aws.icerock.dev/kotlin-version?group=dev.icerock.moko&name=permissions)

# Mobile Kotlin runtime permissions multiplatform controller
**moko-permissions** - Kotlin MultiPlatform library for providing runtime permissions on iOS & Android.

## Table of Contents
- [Features](#features)
- [Requirements](#requirements)
- [Versions](#versions)
- [Installation](#installation)
- [List of supported permissions](#list-of-supported-permissions)
- [Usage](#usage)
Expand All @@ -22,28 +21,9 @@
- **DeniedException** and **DeniedAlwaysException** - exceptions to handle user denial of permissions

## 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
- kotlin 1.3.61
- 0.3.0
- 0.4.0
- kotlin 1.3.70
- 0.5.0
- 0.5.1
- kotlin 1.4.0
- 0.6.0
- 0.7.0

### mavenCentral
- kotlin 1.4.31
- 0.8.0
- iOS version 11.0+

## Installation
root **build.gradle**
Expand All @@ -58,7 +38,8 @@ allprojects {
project **build.gradle**
```groovy
dependencies {
commonMainApi("dev.icerock.moko:permissions:0.8.0")
commonMainApi("dev.icerock.moko:permissions:0.10.0")
commonTestImplementation("dev.icerock.moko:permissions-test:0.10.0")
}
```

Expand Down Expand Up @@ -144,4 +125,4 @@ More detailed guide for contributers see in [contributing guide](CONTRIBUTING.md
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.
104 changes: 8 additions & 96 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,109 +2,21 @@
* Copyright 2019 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license.
*/

import java.util.Base64

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

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

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)
}
}
dependencies {
classpath(":permissions-build-logic")
}
}

plugins.withId(Deps.Plugins.mavenPublish.id) {
allprojects {
plugins.withId("org.gradle.maven-publish") {
group = "dev.icerock.moko"
version = Deps.mokoPermissionsVersion

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 permissions")
description.set("Runtime permissions controls for mobile (android & ios) Kotlin Multiplatform development")
url.set("https://github.com/icerockdev/moko-permissions")
licenses {
license {
url.set("https://github.com/icerockdev/moko-permissions/blob/master/LICENSE.md")
}
}

developers {
developer {
id.set("Alex009")
name.set("Aleksey Mikhailov")
email.set("[email protected]")
}
developer {
id.set("Tetraquark")
name.set("Vladislav Areshkin")
email.set("[email protected]")
}
developer {
id.set("kovalandrew")
name.set("Andrew Kovalev")
email.set("[email protected]")
}
developer {
id.set("RezMike")
name.set("Mikhail Reznichenko")
email.set("[email protected]")
}
}

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

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

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)
}
}
}
version = libs.versions.mokoPermissionsVersion.get()
}
}

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

This file was deleted.

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

This file was deleted.

19 changes: 19 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[versions]
kotlinVersion = "1.5.20"
androidAppCompatVersion = "1.2.0"
materialDesignVersion = "1.0.0"
androidLifecycleVersion = "2.1.0"
androidCoreTestingVersion = "2.1.0"
coroutinesVersion = "1.5.0-native-mt"
mokoMvvmVersion = "0.11.0"
mokoPermissionsVersion = "0.10.0"

[libraries]
appCompat = { module = "androidx.appcompat:appcompat", version.ref = "androidAppCompatVersion" }
material = { module = "com.google.android.material:material", version.ref = "materialDesignVersion" }
lifecycle = { module = "androidx.lifecycle:lifecycle-extensions", version.ref = "androidLifecycleVersion" }
coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutinesVersion" }
mokoMvvmCore = { module = "dev.icerock.moko:mvvm-core", version.ref = "mokoMvvmVersion" }
mokoMvvmTest = { module = "dev.icerock.moko:mvvm-test", version.ref = "mokoMvvmVersion" }
kotlinTestJUnit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlinVersion" }
androidCoreTesting = { module = "androidx.arch.core:core-testing", version.ref = "androidCoreTestingVersion" }
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
17 changes: 17 additions & 0 deletions permissions-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)
}
}
Loading

0 comments on commit f800970

Please sign in to comment.