Skip to content
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

Update app to work with newer versions of Android Studio, Gradle plugin etc. #17

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

sandy-8925
Copy link

  • Doesn't update targetSdkVersion yet, will work on that next
  • Moved to using Android Jetpack
  • Removed SnackEngage because it was causing a lot of build issues. Can add it back, after fixing the problem with building SnackEngage.
  • Used ViewBinding in place of KotlinX synthetics which is deprecated
  • Moved ViewHolder classes into their respective activities, since they're not used anywhere else. Kotlin allows for multiple top-level classes in a single file, so a bunch of related classes can be placed together in one file, and won't be exposed outside the file if they're marked private.

@ligi
Copy link
Owner

ligi commented Dec 21, 2020

thanks! what build-issues did you see with SnackEngage?

@sandy-8925
Copy link
Author

thanks! what build-issues did you see with SnackEngage?

It was pulling in kotlin-runtime dependency, and since kotlin-runtime was merged into kotlin-stdlib upstream, there were conflicts. Other than that, I was unable to use the latest version (0.26) - the Gradle build was unable to download that version.

@ligi
Copy link
Owner

ligi commented Dec 21, 2020

the latest version is 0.27 and judging from jitpack it should be available: https://jitpack.io/com/github/ligi/snackengage/0.27/build.log - could try later today

@sandy-8925
Copy link
Author

Ok, I will try out that version and see if it works.

@sandy-8925
Copy link
Author

sandy-8925 commented Dec 21, 2020

I specified the dependency on SnackEngage as follows:
implementation 'com.github.ligi:snackengage:0.27'

and I got the following build errors:

Duplicate class org.ligi.snackengage.rate.BuildConfig found in modules jetified-snackengage-amazonrate-0.27-runtime (com.github.ligi.snackengage:snackengage-amazonrate:0.27) and jetified-snackengage-playrate-0.27-runtime (com.github.ligi.snackengage:snackengage-playrate:0.27)
Duplicate class org.ligi.snackengage.snacks.DefaultRateSnack found in modules jetified-snackengage-amazonrate-0.27-runtime (com.github.ligi.snackengage:snackengage-amazonrate:0.27) and jetified-snackengage-playrate-0.27-runtime (com.github.ligi.snackengage:snackengage-playrate:0.27)
Duplicate class org.ligi.snackengage.snacks.RateSnack found in modules jetified-snackengage-amazonrate-0.27-runtime (com.github.ligi.snackengage:snackengage-amazonrate:0.27) and jetified-snackengage-playrate-0.27-runtime (com.github.ligi.snackengage:snackengage-playrate:0.27)

@ligi
Copy link
Owner

ligi commented Dec 21, 2020

ah - please just do

implementation 'com.github.ligi.snackengage:snackengage-playrate:0.27'

@sandy-8925
Copy link
Author

ah - please just do

implementation 'com.github.ligi.snackengage:snackengage-playrate:0.27'

That worked. Thanks!

@ligi
Copy link
Owner

ligi commented Dec 21, 2020

great!
Just gave it my CI and it fails on the lint stage - I will have a deeper look once the CI is happy

@sandy-8925
Copy link
Author

Looks like all of the Lint issues are already existing issues, and not new ones introduced by my code. Will see if I can fix some of those in a different PR.

@ligi
Copy link
Owner

ligi commented Dec 22, 2020

Usually it is new lint rules coming with the new tooling

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants