From 76054106da887827f2d33de04cfcca512c87e815 Mon Sep 17 00:00:00 2001 From: hotchemi Date: Sun, 17 Sep 2017 19:19:59 +0900 Subject: [PATCH] Prepare for 3.0.1 and tweak a migration guide. --- CHANGELOG.md | 3 +++ doc/migration_guide.md | 18 ++++++++---------- gradle.properties | 4 ++-- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 159ac107..f8fde831 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # ChangeLog +- 3.0.1 2017/09/17 + - Fix: NeedsPermission annotated method with parameter doesn't work in Kotlin [#376](https://github.com/permissions-dispatcher/PermissionsDispatcher/issues/376) + - Fix: CallNeedsPermission check incorrectly flags calls to methods of different class [#377](https://github.com/permissions-dispatcher/PermissionsDispatcher/issues/377) - 3.0.0 2017/09/16 - Add fully [Kotlin support](https://github.com/hotchemi/PermissionsDispatcher/blob/master/doc/kotlin_support.md)! - Allow for Deterministic, Reproducible Builds with sorted inputs [#342](https://github.com/permissions-dispatcher/PermissionsDispatcher/pull/342) diff --git a/doc/migration_guide.md b/doc/migration_guide.md index 25ad1a75..151481c7 100644 --- a/doc/migration_guide.md +++ b/doc/migration_guide.md @@ -3,7 +3,7 @@ - [Migrating to 3.x](#migrating-to-permissionsdispatcher-3x) - [Migrating to 2.x](#migrating-to-permissionsdispatcher-2x) -## Migrating to PermissionsDispatcher 3.x +## Migrating to 3.x ### Method name changing @@ -25,7 +25,7 @@ This change is especially beneficial in Kotlin, because the receiver of the gene Issue: [#320](https://github.com/permissions-dispatcher/PermissionsDispatcher/issues/320) -Actually it's been possible to use PermissionsDispatcher with Kotlin already, because of its interoperability with Java. But to give you a more concise, comfortable and idiomatic experience, we added full Kotlin support which is described in [here](kotlin_support.md). +Actually it's been possible to use PermissionsDispatcher with Kotlin already, because of its interoperability with Java. But to give you a more concise and idiomatic experience, we added full Kotlin support which is described in [here](kotlin_support.md). If you're already using PermissionsDispatcher with Kotlin, be aware of the following 2 changes: @@ -33,8 +33,8 @@ If you're already using PermissionsDispatcher with Kotlin, be aware of the follo ```diff button.setOnClickListener { -- MainActivityPermissionsDispatcher.showCameraWithCheck(this) -+ showCameraWithPermissionCheck() +- MainActivityPermissionsDispatcher.showCameraWithCheck(this) ++ showCameraWithPermissionCheck() } ``` @@ -43,16 +43,14 @@ button.setOnClickListener { ```diff override fun onRequestPermissionsResult(requestCode: Int, permissions: Array, grantResults: IntArray) { super.onRequestPermissionsResult(requestCode, permissions, grantResults) -- MainActivityPermissionsDispatcher.onRequestPermissionsResult(requestCode, grantResults) -+ onRequestPermissionsResult(requestCode, grantResults) +- MainActivityPermissionsDispatcher.onRequestPermissionsResult(requestCode, grantResults) ++ onRequestPermissionsResult(requestCode, grantResults) } ``` -And that's it! +Those methods are defined as extension functions so now you don't have to call `***MainActivityPermissionsDispatcher` class! - - -## Migrating to PermissionsDispatcher 2.x +## Migrating to 2.x Since the internals of PermissionsDispatcher 2 have undergone a fundamental refactoring, most notably in the switch of languages to Kotlin for our annotation processor, the exposed APIs to users of the library have been tweaked as well. This guide will help you migrate to the latest version in just a few minutes! diff --git a/gradle.properties b/gradle.properties index a56bcb44..5b392272 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,13 +5,13 @@ USER = hotchemi GROUP_ID = com.github.hotchemi ARTIFACT_ID_LIBRARY = permissionsdispatcher ARTIFACT_ID_PROCESSOR = permissionsdispatcher-processor -VERSION = 3.1.0-SNAPSHOT +VERSION = 3.0.1 DESCRIPTION = Annotation-based library for generating runtime permissions dispatcher. WEBSITE = https://github.com/hotchemi/PermissionsDispatcher LICENCES = ['Apache-2.0'] # Plugin versions -GRADLE_PLUGIN_VERSION=3.0.0-beta5 +GRADLE_PLUGIN_VERSION=3.0.0-beta6 KOTLIN_VERSION=1.1.4-3 BINTRAY_PLUGIN_VERSION=0.5.0 CONFIG_PLUGIN_VERSION=2.2.2