Skip to content

Commit

Permalink
Migrate to maven central (#5)
Browse files Browse the repository at this point in the history
* Put in defense for issue 278 (googlesamples#290)

* Updating project to support Android Studio 4.0 (googlesamples#307)

* Updating module 'app' to Java 8 syntax (googlesamples#308)

* Changed getContext() to requireContext(), to ensure it is not null. (googlesamples#309)

* Add link to easypermissions-ktx

* Move from JCenter to Maven Central (googlesamples#323)

* Add the @IntRange annotation to requestCode to prevent invalid input (googlesamples#325)

Co-authored-by: gaopengfei <[email protected]>

* Move to GitHub Actions (googlesamples#326)

* Start migrating project to maven central

* Fix build

* Update with correct maven central links

Co-authored-by: Sam Stern <[email protected]>
Co-authored-by: Fung <[email protected]>
Co-authored-by: Fung <[email protected]>
Co-authored-by: coder1024 <[email protected]>
Co-authored-by: gaopengfei <[email protected]>
  • Loading branch information
6 people authored May 4, 2021
1 parent 2237948 commit bf97578
Show file tree
Hide file tree
Showing 13 changed files with 133 additions and 218 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: build

on:
- pull_request
- push

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build with Gradle
run: |
./gradlew build spotlessCheck :easypermissions:spotlessCheck :easypermissions:ktlintCheck :easypermissions:detekt :easypermissions:test jacocoTestReportRelease
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Change Log
==========

Version 1.0.0 *(2021-05-04)*
----------------------------

* Migrated to maven central.

Version 0.1.0 *(2020-12-22)*
----------------------------

Expand Down
28 changes: 18 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# EasyPermissions-ktx [![Build Status][1]][2] [![Code Coverage][3]][4] [![Latest Version][5]][6] [![Android API][7]][8] [![Apache License][9]][10]
# EasyPermissions-ktx
[![Build Status][1]][2] [![Code Coverage][3]][4] [![Latest Version][5]][6] [![Android API][7]][8] [![Kotlin Weekly][9]][10] [![Android Weekly][11]][12] [![Apache License][13]][14]

Kotlin version of the popular [googlesample/easypermissions](https://github.com/googlesamples/easypermissions) wrapper library to simplify basic system
permissions logic on Android M or higher.

![](art/logo.png)
[![Logo](art/logo.png)](https://www.youtube.com/watch?v=51fX94dU7Og)

This library lifts the burden that comes with writing a bunch of check statements whether a permission has been granted or not from you, in order to keep your code clean and safe.

Expand All @@ -13,10 +14,14 @@ EasyPermissions-ktx is installed by adding the following dependency to your `bui

```groovy
dependencies {
   implementation 'com.vmadalin:easypermissions-ktx:0.1.0'
   implementation 'com.vmadalin:easypermissions-ktx:1.0.0'
}
```

## Tutorial

This [video tutorial](https://www.youtube.com/watch?v=51fX94dU7Og) helps and guide you regarding all the process to integrate the library to your project and configure it, thanks to [Stevdza-San](https://www.youtube.com/channel/UCYLAirIEMMXtWOECuZAtjqQ).

## Usage

### Basic
Expand Down Expand Up @@ -193,14 +198,17 @@ Rationale callbacks don't necessarily imply permission changes. To check for tho
limitations under the License.
```

[1]: https://travis-ci.com/vmadalin/easypermissions-ktx.svg?branch=master
[2]: https://travis-ci.com/vmadalin/easypermissions-ktx
[1]: https://github.com/VMadalin/easypermissions-ktx/workflows/build/badge.svg
[2]: https://github.com/VMadalin/easypermissions-ktx/actions
[3]: https://codecov.io/gh/vmadalin/easypermissions-ktx/branch/master/graph/badge.svg
[4]: https://codecov.io/gh/vmadalin/easypermissions-ktx
[5]: https://api.bintray.com/packages/mvalceleanu/EasyPermissions-ktx/easypermissions-ktx/images/download.svg
[6]: https://bintray.com/mvalceleanu/EasyPermissions-ktx/easypermissions-ktx/_latestVersion
[5]: https://img.shields.io/maven-central/v/com.vmadalin/easypermissions-ktx.svg?label=Maven%20Central
[6]: https://search.maven.org/search?q=g:%22com.vmadalin%22%20AND%20a:%22easypermissions-ktx%22
[7]: https://img.shields.io/badge/API-14%2B-blue.svg?style=flat
[8]: https://android-arsenal.com/api?level=14
[9]: https://img.shields.io/badge/License-Apache%202.0-lightgrey.svg
[10]: http://www.apache.org/licenses/LICENSE-2.0
[9]: https://img.shields.io/badge/Kotlin%20Weekly-%23230-yellow
[10]: https://mailchi.mp/kotlinweekly/kotlin-weekly-230
[11]: https://img.shields.io/badge/Android%20Weekly-%23446-yellow
[12]: https://androidweekly.net/issues/issue-446
[13]: https://img.shields.io/badge/License-Apache%202.0-lightgrey.svg
[14]: http://www.apache.org/licenses/LICENSE-2.0
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion project.compileSdk
compileSdkVersion 30

defaultConfig {
applicationId "com.vmadalin.easypermissions.sample"
minSdkVersion 14
targetSdkVersion targetSdk
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Expand Down
22 changes: 3 additions & 19 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
buildscript {
ext.kotlin_version = '1.4.10'
ext.kotlin_version = '1.4.32'
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:4.1.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
classpath 'com.android.tools.build:gradle:4.1.3'
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.14.2'
classpath 'com.vanniktech:gradle-android-junit-jacoco-plugin:0.16.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlin_version"
Expand All @@ -31,19 +31,3 @@ allprojects {
jcenter()
}
}

ext {
projectName = 'EasyPermissions-ktx'
projectDesc = 'A Kotlin wrapper library for basic Android M system permissions logic'

githubUrl = 'https://github.com/VMadalin/easypermissions-ktx'

mavenGroup = 'com.vmadalin'
mavenArtifactId = 'easypermissions-ktx'
mavenVersion = '0.1.0'

bintrayOrg = 'mvalceleanu'

compileSdk = 29
targetSdk = 29
}
113 changes: 0 additions & 113 deletions easypermissions-ktx/bintray.gradle

This file was deleted.

15 changes: 11 additions & 4 deletions easypermissions-ktx/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,26 @@ apply plugin: 'kotlin-allopen'
apply plugin: 'com.vanniktech.android.junit.jacoco'
apply plugin: 'org.jetbrains.dokka'

// See: https://github.com/vanniktech/gradle-maven-publish-plugin/issues/206
ext {
RELEASE_REPOSITORY_URL = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
SNAPSHOT_REPOSITORY_URL = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
}

apply plugin: 'com.vanniktech.maven.publish'

allOpen {
annotation("com.vmadalin.easypermissions.annotations.Mockable")
}

android {
compileSdkVersion project.compileSdk
compileSdkVersion 30

defaultConfig {
minSdkVersion 14
targetSdkVersion targetSdk
targetSdkVersion 30
versionCode 1
versionName mavenVersion
versionName "1.0.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

Expand Down Expand Up @@ -70,7 +78,6 @@ dependencies {
testAnnotationProcessor 'com.google.auto.service:auto-service:1.0-rc4'
}

apply from: 'bintray.gradle'
repositories {
mavenCentral()
}
18 changes: 18 additions & 0 deletions easypermissions-ktx/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
GROUP=com.vmadalin
POM_ARTIFACT_ID=easypermissions-ktx
VERSION_NAME=1.0.0

POM_NAME=EasyPermissions-ktx
POM_PACKAGING=aar

POM_DESCRIPTION=A Kotlin wrapper library for basic Android M system permissions logic

POM_URL=https://github.com/VMadalin/easypermissions-ktx
POM_SCM_URL=https://github.com/VMadalin/easypermissions-ktx
POM_SCM_CONNECTION=https://github.com/VMadalin/easypermissions-ktx.git

POM_LICENCE_NAME=The Apache Software License, Version 2.0
POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
POM_LICENCE_DIST=repo

POM_DEVELOPER_NAME=VMadalin
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Sun Sep 01 17:03:01 CEST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit bf97578

Please sign in to comment.