penfeizhou / APNG4Android

Android animation support for APNG & Animated WebP & Gif & Animated AVIF, High performance
Apache License 2.0
570 stars 75 forks source link

Update Gradle, build tools, libraries, demo code, tests #198

Closed nikclayton closed 1 year ago

nikclayton commented 1 year ago

Build infrastructure

Language

Library code

Demo app code

Tests

nikclayton commented 1 year ago

Hi. In order to be able to debug https://github.com/penfeizhou/APNG4Android/issues/188 I need to be able to build the library locally.

I couldn't, using Android Studio Giraffe (the current stable version), so I updated Gradle and assorted libraries to get that to work.

This passes .\gradlew check connectedCheck, and the demo app builds and installs with no problems.

I have not tested the changes to the Maven publishing pipeline. The maven plugin is not supported any more. This uses the new plugin, but will need careful review to make sure it still does what you want.

nikclayton commented 1 year ago

Turned out that setting the root project name was needed as well.

With the changes in this PR I can take a project that uses APNG4Android and use a local copy by:

  1. Checking out this repo (or a fork)
  2. Editing my project's settings.gradle file, and adding:
    includeBuild('/path/to/my/checkout/of/APNG4Android')
  3. Editing my project's dependencies and changing:
implementation 'com.github.penfeizhou.android.animation:glide-plugin:2.23.0'

to

implementation 'com.github.penfeizhou.android.animation:plugin_glide'

(i.e., drop the version number, and change glide-plugin to plugin_glide to match the module name).