Skip to content

Commit d9a057c

Browse files
committed
chore: native project update
1 parent 752c5a8 commit d9a057c

File tree

5 files changed

+40
-131
lines changed

5 files changed

+40
-131
lines changed

src-native/android/.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,3 @@ android:
2626

2727
script:
2828
- ./gradlew install
29-
- ./gradlew bintrayUpload

src-native/android/README.md

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +0,0 @@
1-
# Kotlin Permissions
2-
3-
[![Build Status](https://travis-ci.org/superjobru/kotlin-permissions.svg?branch=master)](https://travis-ci.org/superjobru/kotlin-permissions) [![API](https://img.shields.io/badge/API-14%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=14)
4-
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-KotlinPermissions-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/7238)
5-
6-
An Android library, written in Kotlin, which helps avoid boilerplate code when your request runtime permissions. You don't need to override onPermissionResult, all results will be in one place.
7-
8-
## Gradle
9-
[ ![Download](https://api.bintray.com/packages/superjob/android/kotlin-permissions/images/download.svg) ](https://bintray.com/superjob/android/kotlin-permissions/_latestVersion)
10-
```gradle
11-
dependencies {
12-
implementation 'ru.superjob:kotlin-permissions:1.0.3'
13-
}
14-
```
15-
16-
## Usage
17-
18-
Call a `KotlinPermissions` instance :
19-
20-
```java
21-
KotlinPermissions.with(this) // where this is an FragmentActivity instance
22-
.permissions(Manifest.permission.ACCESS_FINE_LOCATION)
23-
.onAccepted { permissions ->
24-
//List of accepted permissions
25-
}
26-
.onDenied { permissions ->
27-
//List of denied permissions
28-
}
29-
.onForeverDenied { permissions ->
30-
//List of forever denied permissions
31-
}
32-
.ask()
33-
```
34-
35-
You can request more than one permission:
36-
```java
37-
.permissions(Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.CAMERA)
38-
```
39-
# License
40-
41-
```
42-
Copyright (C) 2018
43-
44-
Licensed under the Apache License, Version 2.0 (the "License");
45-
you may not use this file except in compliance with the License.
46-
You may obtain a copy of the License at
47-
48-
http://www.apache.org/licenses/LICENSE-2.0
49-
50-
Unless required by applicable law or agreed to in writing, software
51-
distributed under the License is distributed on an "AS IS" BASIS,
52-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
53-
See the License for the specific language governing permissions and
54-
limitations under the License.
55-
```

src-native/android/build.gradle

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,16 @@ buildscript {
77
jcenter()
88
}
99
dependencies {
10-
classpath 'com.android.tools.build:gradle:3.1.4'
11-
// classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
12-
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
13-
// NOTE: Do not place your application dependencies here; they belong
14-
// in the individual module build.gradle files
10+
classpath 'com.android.tools.build:gradle:7.+'
1511
}
1612
}
1713

18-
// Plugin used to upload authenticated files to BinTray through Gradle
19-
plugins {
20-
id "com.jfrog.bintray" version "1.7.3"
21-
}
22-
2314
allprojects {
2415
repositories {
2516
google()
2617
jcenter()
2718
}
2819
}
29-
3020
task clean(type: Delete) {
3121
delete rootProject.buildDir
3222
}

src-native/android/canvas/build.gradle

Lines changed: 38 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
apply plugin: 'com.android.library'
2-
// apply plugin: 'kotlin-android'
3-
apply plugin: 'com.github.dcendents.android-maven'
4-
//apply plugin: 'com.jfrog.bintray'
52

63
android {
7-
compileSdkVersion 27
4+
compileSdkVersion 30
85

96
defaultConfig {
107
minSdkVersion 14
11-
targetSdkVersion 27
8+
targetSdkVersion 30
129
versionCode 1
1310
versionName "1.0.0"
1411

@@ -29,44 +26,44 @@ android {
2926
}
3027
}
3128

32-
ext.artifact = [
33-
'groupId': 'com.akylas',
34-
'id' : 'canvas',
35-
'version': '1.0.0',
36-
'siteUrl': 'https://github.com',
37-
'gitUrl' : 'https://github.com',
38-
'userOrg': 'farfromrefug',
39-
'repo' : 'android'
40-
]
29+
// ext.artifact = [
30+
// 'groupId': 'com.akylas',
31+
// 'id' : 'canvas',
32+
// 'version': '1.0.0',
33+
// 'siteUrl': 'https://github.com',
34+
// 'gitUrl' : 'https://github.com',
35+
// 'userOrg': 'farfromrefug',
36+
// 'repo' : 'android'
37+
// ]
4138

42-
version = artifact.version
43-
group = artifact.groupId
39+
// version = artifact.version
40+
// group = artifact.groupId
4441

45-
install {
46-
repositories.mavenInstaller {
47-
pom.project {
48-
packaging 'jar'
49-
groupId artifact.groupId
50-
artifactId artifact.id
51-
version artifact.version
52-
name artifact.id // pom.project.name must be same as bintray.pkg.name
53-
url artifact.siteUrl
54-
inceptionYear '2018' // HARDCODED
55-
licenses {
56-
license { // HARDCODED
57-
name 'GPL-3.0'
58-
url 'https://www.gnu.org/licenses/gpl.txt'
59-
distribution 'repo'
60-
}
61-
}
62-
scm {
63-
connection artifact.gitUrl
64-
developerConnection artifact.gitUrl
65-
url artifact.siteUrl
66-
}
67-
}
68-
}
69-
}
42+
// install {
43+
// repositories.mavenInstaller {
44+
// pom.project {
45+
// packaging 'jar'
46+
// groupId artifact.groupId
47+
// artifactId artifact.id
48+
// version artifact.version
49+
// name artifact.id
50+
// url artifact.siteUrl
51+
// inceptionYear '2018' // HARDCODED
52+
// licenses {
53+
// license { // HARDCODED
54+
// name 'GPL-3.0'
55+
// url 'https://www.gnu.org/licenses/gpl.txt'
56+
// distribution 'repo'
57+
// }
58+
// }
59+
// scm {
60+
// connection artifact.gitUrl
61+
// developerConnection artifact.gitUrl
62+
// url artifact.siteUrl
63+
// }
64+
// }
65+
// }
66+
// }
7067

7168
task sourcesJar(type: Jar) {
7269
from android.sourceSets.main.java.srcDirs
@@ -89,28 +86,6 @@ artifacts {
8986
// archives javadocJar
9087
}
9188

92-
//Properties properties = new Properties()
93-
//File propFile = "${System.properties['user.home']}/.gradle/bintray.properties" as File
94-
//properties.load(propFile.newDataInputStream())
95-
//
96-
//bintray {
97-
// user = properties.getProperty("bintray.user")
98-
// key = properties.getProperty("bintray.apikey")
99-
//
100-
// configurations = ['archives']
101-
// pkg {
102-
// repo = artifact.repo
103-
// name = artifact.id
104-
// websiteUrl = artifact.siteUrl
105-
// vcsUrl = artifact.gitUrl
106-
// userOrg = artifact.userOrg
107-
// licenses = ['Apache-2.0']
108-
// publish = true
109-
// version {
110-
// name = artifact.version
111-
// }
112-
// }
113-
//}
11489

11590
dependencies {
11691
implementation "androidx.annotation:annotation:1.1.0"

src-native/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip

0 commit comments

Comments
 (0)