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

Upgrade Build Tools / SDK / Kotlin #249

Merged
merged 1 commit into from
Feb 10, 2023

Conversation

IanDBird
Copy link
Contributor

I started looking into fleshing out CameraX support but found when adding the dependency, there was a miss-match of kotlin version that reported warnings. I then went down a rabbit hole to see what would be required to upgrade. These were the changes I ended up making, so thought I would raise a PR for consideration. This also includes some fixes for the warnings coming identified by the upgraded build tools.

This change includes:

  • Updating Kotlin version from 1.4.32 -> 1.7.20
  • Updating AGP 7.1.2 -> 7.3.1
  • Updating compileSdkVersion 30 -> 33

@@ -38,6 +39,7 @@ class RecordAudioPresenter(
private val mediaTransformer: MediaTransformer
) : TransformationPresenter(context, mediaTransformer) {

@SuppressLint("MissingPermission")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is demo app code, I thought I would just suppress the warning rather than doing all the plumbing to expose the required permission. In prod code, the MediaSource correctly exposes this and the consumer can handle it accordingly.

@@ -31,6 +32,7 @@ class RecordCameraPresenter(
private val mediaTransformer: MediaTransformer
) : TransformationPresenter(context, mediaTransformer) {

@SuppressLint("MissingPermission")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is demo app code, I thought I would just suppress the warning rather than doing all the plumbing to expose the required permission. In prod code, the MediaSource correctly exposes this and the consumer can handle it accordingly.

@RequiresApi(Build.VERSION_CODES.LOLLIPOP)
fun getDisplaySmartSize(display: Display): SmartSize {
val outPoint = Point()
display.getRealSize(outPoint)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is deprecated. Since it was only there to handle devices with "smaller than 1080p screens" and is only demo app code, I decided to simplify the code and just remove it.

Copy link
Contributor

@izzytwosheds izzytwosheds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@izzytwosheds izzytwosheds merged commit d4e0c01 into linkedin:main Feb 10, 2023
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