Skip to content
This repository was archived by the owner on Oct 3, 2024. It is now read-only.

Commit 08c8e6c

Browse files
authored
Consumer proguard rules, javadoc artifact (#143)
1 parent a4d551b commit 08c8e6c

File tree

8 files changed

+30
-27
lines changed

8 files changed

+30
-27
lines changed

app/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ android {
1616

1717
buildTypes {
1818
release {
19-
minifyEnabled false
19+
minifyEnabled true
2020
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
2121
}
2222
}

build.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
buildscript {
22
repositories {
33
jcenter()
4-
google()
4+
maven { url 'https://maven.google.com' }
55
}
66

77
dependencies {
8-
classpath 'com.android.tools.build:gradle:3.0.0-alpha1'
8+
classpath 'com.android.tools.build:gradle:3.0.0-alpha8'
99

1010
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
1111
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
@@ -15,7 +15,7 @@ buildscript {
1515
allprojects {
1616
repositories {
1717
jcenter()
18-
google()
18+
maven { url 'https://maven.google.com' }
1919
}
2020
}
2121

easypermissions/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ android {
1414
buildTypes {
1515
release {
1616
minifyEnabled false
17-
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
17+
consumerProguardFiles 'proguard-rules.pro'
1818
}
1919
}
2020
}

easypermissions/maven.gradle

+14
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,20 @@ task sourcesJar(type: Jar) {
3939
classifier = 'sources'
4040
}
4141

42+
task javadoc(type: Javadoc) {
43+
source = android.sourceSets.main.java.srcDirs
44+
classpath += configurations.compile
45+
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
46+
47+
failOnError = false
48+
}
49+
50+
task javadocJar(type: Jar, dependsOn: javadoc) {
51+
classifier = 'javadoc'
52+
from javadoc.destinationDir
53+
}
54+
4255
artifacts {
4356
archives sourcesJar
57+
archives javadocJar
4458
}

easypermissions/proguard-rules.pro

+3-17
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
1-
# Add project specific ProGuard rules here.
2-
# By default, the flags in this file are appended to flags specified
3-
# in ${sdk.dir}/tools/proguard/proguard-android.txt
4-
# You can edit the include path and order by changing the proguardFiles
5-
# directive in build.gradle.
6-
#
7-
# For more details, see
8-
# http://developer.android.com/guide/developing/tools/proguard.html
9-
10-
# Add any project specific keep options here:
11-
12-
# If your project uses WebView with JS, uncomment the following
13-
# and specify the fully qualified class name to the JavaScript interface
14-
# class:
15-
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16-
# public *;
17-
#}
1+
-keepclassmembers class * {
2+
@pub.devrel.easypermissions.AfterPermissionGranted <methods>;
3+
}

easypermissions/src/main/java/pub/devrel/easypermissions/EasyPermissions.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
import pub.devrel.easypermissions.helper.PermissionHelper;
3636

3737
/**
38-
* Utility to request and check System permissions for apps targeting Android M (API >= 23).
38+
* Utility to request and check System permissions for apps targeting Android M (API &gt;= 23).
3939
*/
4040
public class EasyPermissions {
4141

@@ -130,7 +130,7 @@ public static void requestPermissions(
130130
* will be displayed if the user rejects the request the first time.
131131
* @param positiveButton custom text for positive button
132132
* @param negativeButton custom text for negative button
133-
* @param requestCode request code to track this request, must be < 256.
133+
* @param requestCode request code to track this request, must be &lt; 256.
134134
* @param perms a set of permissions to be requested.
135135
* @see Manifest.permission
136136
*/
@@ -254,7 +254,7 @@ public static boolean somePermissionPermanentlyDenied(@NonNull Activity host,
254254
}
255255

256256
/**
257-
* @see #somePermissionPermanentlyDenied(Activity, List).
257+
* @see #somePermissionPermanentlyDenied(Activity, List)
258258
*/
259259
public static boolean somePermissionPermanentlyDenied(@NonNull Fragment host,
260260
@NonNull List<String> deniedPermissions) {
@@ -284,7 +284,7 @@ public static boolean permissionPermanentlyDenied(@NonNull Activity host,
284284
}
285285

286286
/**
287-
* @see #permissionPermanentlyDenied(Activity, String).
287+
* @see #permissionPermanentlyDenied(Activity, String)
288288
*/
289289
public static boolean permissionPermanentlyDenied(@NonNull Fragment host,
290290
@NonNull String deniedPermission) {

gradle.properties

+3
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,6 @@ org.gradle.jvmargs=-Xmx1536m
1717
# This option should only be used with decoupled projects. More details, visit
1818
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
1919
# org.gradle.parallel=true
20+
21+
# https://github.com/robolectric/robolectric/issues/3157
22+
android.enableAapt2=false

gradle/wrapper/gradle-wrapper.properties

+1-1
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-4.0-rc-3-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-milestone-1-all.zip

0 commit comments

Comments
 (0)