diff --git a/app/build.gradle b/app/build.gradle index 18cc82e..819f596 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -16,7 +16,7 @@ android { buildTypes { release { - minifyEnabled false + minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } diff --git a/build.gradle b/build.gradle index 191b970..e6ed914 100644 --- a/build.gradle +++ b/build.gradle @@ -1,11 +1,11 @@ buildscript { repositories { jcenter() - google() + maven { url 'https://maven.google.com' } } dependencies { - classpath 'com.android.tools.build:gradle:3.0.0-alpha1' + classpath 'com.android.tools.build:gradle:3.0.0-alpha8' classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3' @@ -15,7 +15,7 @@ buildscript { allprojects { repositories { jcenter() - google() + maven { url 'https://maven.google.com' } } } diff --git a/easypermissions/build.gradle b/easypermissions/build.gradle index 137f278..a3590d8 100644 --- a/easypermissions/build.gradle +++ b/easypermissions/build.gradle @@ -14,7 +14,7 @@ android { buildTypes { release { minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + consumerProguardFiles 'proguard-rules.pro' } } } diff --git a/easypermissions/maven.gradle b/easypermissions/maven.gradle index df740d1..a2ad16b 100644 --- a/easypermissions/maven.gradle +++ b/easypermissions/maven.gradle @@ -39,6 +39,20 @@ task sourcesJar(type: Jar) { classifier = 'sources' } +task javadoc(type: Javadoc) { + source = android.sourceSets.main.java.srcDirs + classpath += configurations.compile + classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) + + failOnError = false +} + +task javadocJar(type: Jar, dependsOn: javadoc) { + classifier = 'javadoc' + from javadoc.destinationDir +} + artifacts { archives sourcesJar + archives javadocJar } diff --git a/easypermissions/proguard-rules.pro b/easypermissions/proguard-rules.pro index 5b86c08..e0ba183 100644 --- a/easypermissions/proguard-rules.pro +++ b/easypermissions/proguard-rules.pro @@ -1,17 +1,3 @@ -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in ${sdk.dir}/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# Add any project specific keep options here: - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} +-keepclassmembers class * { + @pub.devrel.easypermissions.AfterPermissionGranted ; +} diff --git a/easypermissions/src/main/java/pub/devrel/easypermissions/EasyPermissions.java b/easypermissions/src/main/java/pub/devrel/easypermissions/EasyPermissions.java index a948000..0a767ae 100644 --- a/easypermissions/src/main/java/pub/devrel/easypermissions/EasyPermissions.java +++ b/easypermissions/src/main/java/pub/devrel/easypermissions/EasyPermissions.java @@ -35,7 +35,7 @@ import pub.devrel.easypermissions.helper.PermissionHelper; /** - * Utility to request and check System permissions for apps targeting Android M (API >= 23). + * Utility to request and check System permissions for apps targeting Android M (API >= 23). */ public class EasyPermissions { @@ -130,7 +130,7 @@ public static void requestPermissions( * will be displayed if the user rejects the request the first time. * @param positiveButton custom text for positive button * @param negativeButton custom text for negative button - * @param requestCode request code to track this request, must be < 256. + * @param requestCode request code to track this request, must be < 256. * @param perms a set of permissions to be requested. * @see Manifest.permission */ @@ -254,7 +254,7 @@ public static boolean somePermissionPermanentlyDenied(@NonNull Activity host, } /** - * @see #somePermissionPermanentlyDenied(Activity, List). + * @see #somePermissionPermanentlyDenied(Activity, List) */ public static boolean somePermissionPermanentlyDenied(@NonNull Fragment host, @NonNull List deniedPermissions) { @@ -284,7 +284,7 @@ public static boolean permissionPermanentlyDenied(@NonNull Activity host, } /** - * @see #permissionPermanentlyDenied(Activity, String). + * @see #permissionPermanentlyDenied(Activity, String) */ public static boolean permissionPermanentlyDenied(@NonNull Fragment host, @NonNull String deniedPermission) { diff --git a/gradle.properties b/gradle.properties index e8cf5b9..ff30f8c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,3 +17,6 @@ org.gradle.jvmargs=-Xmx1536m # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true + +# https://github.com/robolectric/robolectric/issues/3157 +android.enableAapt2=false diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 0bd275d..1bb331d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-rc-3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-milestone-1-all.zip