-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(fix): this fixes proguard rules when running minifyEnabled #266
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue is still there I tested these changes with my android java project and I am still getting that error.
@mnoman09 can you share your project with me? How did you install the aar s? |
@mnoman09 after looking at your project and changing it to use my branch instead of master for the fix, it worked. |
yes I tested it with my project and It's working so lgtm. |
// only cancel periodic services | ||
if (ServiceScheduler.isScheduled(context, id)) { | ||
jobScheduler.cancel(id); | ||
} | ||
pendingIntent.cancel(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does moving this here do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is just consistent with what is below it. We first cancel the alarm and then the pendingIntent. Here we cancel the job and then the pending intent. Basically, it is so if the pendingIntent throws, we have still cancelled the scheduled job.
@@ -66,8 +66,7 @@ dependencies { | |||
exclude group: 'com.google.code.findbugs' | |||
} | |||
|
|||
compileOnly group: 'org.slf4j', name: 'slf4j-android', version: '1.7.25' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need this anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a compile only for noveo android logger. We don't need both.
@@ -66,8 +66,7 @@ dependencies { | |||
exclude group: 'com.google.code.findbugs' | |||
} | |||
|
|||
compileOnly group: 'org.slf4j', name: 'slf4j-android', version: '1.7.25' | |||
|
|||
compileOnly "com.fasterxml.jackson.core:jackson-databind:$jacksonversion" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean we explicitly bundle jackson with our SDK? Would the user be able to exclude it from their app?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is compile only. So, it is not a explicit dependency. If you are not using jackson, then, there is no effect. If you are using jackson, you would add this as a implementation in your gradle. Essentially, this is so our jackson code compiles. We still default to gson.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
* this fixes proguard rules when running minifyEnabled * remove extra compileOnly include * add compile only for slf4j. also, cleanup organization of gradle file. * cancel pending after jobscheduler
Summary
I was able to reproduce this problem turning on minify on a kotlin project. The following rules and compile cleanups, enabled the apk to be created, installed, and ran, without issue.
Test plan
Created test apps to reproduce the issue.
Issues