prolificinteractive / material-calendarview

A Material design back port of Android's CalendarView
https://prolificinteractive.github.io/material-calendarview/
MIT License
5.92k stars 1.32k forks source link

Android Studio 3.3 and gradle plugin 3.3.0 wont compile #917

Open barnhill opened 5 years ago

barnhill commented 5 years ago

To get a project consuming this library to work in AS3.3 with gradle plugin 3.3.0 you have to use the following in your build.gradle.

implementation ("com.github.prolificinteractive:material-calendarview:2.0.0") { exclude group: 'com.jakewharton.threetenabp', module: 'threetenabp' } implementation 'com.jakewharton.threetenabp:threetenabp:1.1.1'

barnhill commented 5 years ago

If you would accept a PR for this Id be fine creating it to update the dependency

kahakai commented 5 years ago

Also works without excluding ThreeTenABP.

barnhill commented 5 years ago

Yea I think it's just the update of the dependency

barnhill commented 5 years ago

@quentin41500 want me to throw together a pull request to address this? Should just be a single dependency update from 1.1.0 to 1.1.1 of threetenabp

quentin41500 commented 5 years ago

@barnhill go for it, I'll review as soon as I can

barnhill commented 5 years ago

For documentation purposes here is the compilation error that I get without this change Im about to make.

screen shot 2019-01-22 at 7 36 10 pm
barnhill commented 5 years ago

Link to Pull Request: https://github.com/prolificinteractive/material-calendarview/pull/920

quentin41500 commented 5 years ago

https://github.com/prolificinteractive/material-calendarview/releases/tag/2.0.1 Please let me know if there is any issues with the pre-release before I do the full release.

barnhill commented 5 years ago

Im still running into a need to include "com.jakewharton.threetenabp:threetenabp:1.1.1" in my dependencies. Something is still up Im afraid.

barnhill commented 5 years ago

@quentin41500

Here is what Im seeing right now. When I import material-calendarview using: implementation "com.github.prolificinteractive:material-calendarview:2.0.1"

This is the error I get on compilation.

error: cannot access LocalDate calendarView.setCurrentDate(CalendarDay.today()); ^ class file for org.threeten.bp.LocalDate not found

Here is a look at the dependencies for the app (or atleast a segment):

+--- com.github.prolificinteractive:material-calendarview:2.0.1 | +--- com.jakewharton.threetenabp:threetenabp:1.1.1 | | --- org.threeten:threetenbp:1.3.7

I have to also include: implementation "org.threeten:threetenbp:1.3.8:no-tzdb"

for it to compile. Ive tried a lot of different things and am coming up empty. Let me know if you have any ideas on how to not have to include this in my gradle since it should be brought in as a transitive dependency of your library.

quentin41500 commented 5 years ago

I haven't check, but we are not leaking threeTenABP on purpose. If you want to access LocalDate and use the object, we do recommend that you add the library.

In the sample, you can see we added:

  implementation rootProject.ext.threeTenAbp
barnhill commented 5 years ago

@quentin41500 we arent using it though. Its on the call to calendarView.setCurrentDate(CalendarDay.today());

barnhill commented 5 years ago

@quentin41500 its interesting that this isnt required unless I update our application to Gradle 5+. On 4.10.2 its fine.