Build the Java side with Gradle, as AAR instead of JAR
ClosedPublic

Authored by vkrause on Sat, Jan 5, 12:03 PM.

Details

Summary

Most importantly this allows us to use the AndroidX support library, to
properly support a wide range of different Android versions (we link to
that for demonstration purposes only atm, it's not actually used yet).

This is closer to the Android way of doing things than the previous raw
approach, which should be more sustainable. The obvious dirty things this
does like copying the build tool into the project or downloading tons of
stuff during the build seem to be "normal".

For this to be consumable by application, a tiny change to their
build.gradle files is needed: https://codereview.qt-project.org/#/c/249179/

Diff Detail

Repository
R289 KNotifications
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
vkrause created this revision.Sat, Jan 5, 12:03 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptSat, Jan 5, 12:03 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
vkrause requested review of this revision.Sat, Jan 5, 12:03 PM
apol added a subscriber: apol.Sun, Jan 6, 11:51 PM

Maybe put it in an android subdirectory? having it straight in src feels odd.

Other than that +1

cmake/modules/FindGradle.cmake
6

Sounds like it should be in ECM, no?

vkrause updated this revision to Diff 48881.Mon, Jan 7, 5:38 PM

Move Android specifc stuff into a subdir.

vkrause added inline comments.Mon, Jan 7, 5:42 PM
cmake/modules/FindGradle.cmake
6

Right, that's the obvious final location for this, once it has proven itself as the right approach here.

apol accepted this revision.Tue, Jan 8, 12:23 AM

LGTM

This revision is now accepted and ready to land.Tue, Jan 8, 12:23 AM
This revision was automatically updated to reflect the committed changes.