finds.dev← search

// the find

android10/Android-AOPExample

★ 420 · Java · Apache-2.0 · updated Aug 2018

This is a simple example of Aspect Oriented Programming in Android

A 2014 blog post companion repo demonstrating Aspect Oriented Programming in Android using AspectJ — specifically a `@DebugTrace` annotation that logs method execution time to logcat. It's a teaching example, not a library. The author acknowledges it's a primitive version of Jake Wharton's Hugo.

The core idea is clearly scoped: one annotation, one aspect, one measurable behavior. The `gintonic` module is cleanly separated from the demo app so the AOP machinery is easy to read in isolation. It works as a minimal reference for how AspectJ weaving hooks into Android's Gradle build.

Abandoned in 2018 — the Gradle build, AspectJ plugin, and Android target SDK are all ancient and will require non-trivial effort to run on anything modern. The actual AOP implementation covers exactly one use case (timing), so there's nothing here beyond what the blog post already explains. If you want this pattern today, Hugo itself is a better starting point and it too is unmaintained, which tells you something about where AspectJ-based AOP landed in Android development.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →