@@ -16,6 +16,27 @@ Each release version for this sample project will correspond to the same AGP ver
1616
1717## Notes
1818
19+ ### Important: AGP 9.0.0 and AndroidAspectExample EOL
20+
21+ It seems this project is on its last legs with the introduction of AGP 9.0.0. It shouldn't matter too
22+ much since this is just a sample project, but heads up that since AGP will be updating their DSL in 9.0.0
23+ and removing it in the near future, this project will stop working. This is because the underlying
24+ Aspect library [ gradle-aspectj-pipeline-plugin] is no longer maintained since 2023 so has not updated
25+ to the new DSL.
26+
27+ For now, i.e. at least the first major release of AGP 9, this can be worked around by using the following
28+ flag in ` gradle.properties ` :
29+
30+ ``` text
31+ android.newDsl=false
32+ ```
33+
34+ As mentioned below, I do not personally recommend AspectJ anymore but if you still prefer to use it,
35+ there do seem to be alternatives out there under active development, such as [ AndroidAOP] . I have not
36+ personally vetted that library but it does appear to be pretty active and have a decent amount of stars.
37+
38+ This project will be updated until the ` newDsl ` flag is removed after which I will probably archive the project.
39+
1940#### Plugin Change
2041
2142As of v4.1.0, this sample project leverages the following Gradle Plugin for weaving aspects:
@@ -38,6 +59,16 @@ kotlinOptions {
3859}
3960```
4061
62+ If you are using a version of Kotlin/AGP where ` kotlinOptions ` has been deprecated or removed, you can use the following
63+ ``` groovy
64+ kotlin {
65+ compilerOptions {
66+ freeCompilerArgs = ["-Xsam-conversions=class"]
67+ }
68+ }
69+ ```
70+
71+
4172You can read more about the issue [ here] if interested.
4273
4374#### Using newer versions of AspectJ
@@ -90,3 +121,4 @@ and playing around with the sample project.
90121[ Why I Don't Recommend Aspect-Oriented Programming in Android in 2023 ] : https://jdvp.me/articles/AOP-in-Android-2023
91122[ would not be broken ] : https://github.com/Ibotta/gradle-aspectj-pipeline-plugin/issues/34
92123[ desugaring ] : https://android-developers.googleblog.com/2023/02/api-desugaring-supporting-android-13-and-java-nio.html
124+ [ AndroidAOP ] : https://github.com/FlyJingFish/AndroidAOP
0 commit comments