It's not perfect because any stale links people follow that link to
anything but this README will still be a 404, but it's at least
something people can find if they walk up the dead link to the top of
the sample's directory.
This API is deprecated in favor of TFLite:
https://developer.android.com/ndk/guides/neuralnetworks/migration-guide.
TFLite has their own docs and samples, and isn't an NDK API anyway so we
don't need to replace these samples with TFLite samples. Just delete the
thing we're recommending against so people don't get confused into
following bad advice.
This used to be done by CI but we ripped that out since there wasn't any
good way to ensure that CI and and local workflows were using the same
clang-format. Back when it was in CI, the pointer alignment was
configured incorrectly (we used the Google style presets, but those are
alignment preserving rather than actually style enforcing). Reformat
everything since the .clang-format file has changed since then so I stop
including so many unrelated edits in my commits.
The version here is like Android's targetSdkVersion: it controls bug
compatibility sorts of things. Bump it up to the CMake version we're
using so we get the modern behaviors.
This has been cargo culted forward in each sample for who knows how
long. Most of these don't use kotlin or the library plugin.
The clean task bit I think was a workaround for a very old AGP bug that
was in the new app templates, but if I create a new project with AS now,
it's no longer included.
Not quite all. I skipped the other-builds directory because 'tis a silly
place that needs to just be merged with the core samples properly as a
build variant rather than being a distinct project.
settings.gradle:
* Add pluginManagement and dependencyResolutionManagement stanzas.
build.gradle:
* Remove declaration of repositories and dependencies, since this goes
in settings.gradle
* Use Kotlin version 1.7.10
* Use AGP version 7.3.0
app/build.gradle:
* Use `plugins { id 'foo' }` instead `apply plugin: 'foo'`
* Compile all samples with the latest version of the SDK (33) and NDK
(25.1.8937393).
* Remove kotlin-android-extensions
Furthermore:
* In CI build script, make detection of debug mode work on MacOS.
* Uncomment webp in CI build script.
* Add missing projects to CI build script (display-p3, hello-oboe,
native-midi, prefab/prefab-dependency)
* Update gradle version to 7.4
* Update hello-oboe and prefab-dependency to use view binding.
* Update native-midi to eliminate compiler warning.