You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Works with background mechanics of jvm-based languages out-of-box!<br />
24
-
[How to teach Android Studio to understand the AspectJ!](IDE)
24
+
[How to teach Android Studio to understand the AspectJ!](IDE)<br />
25
+
May not work for AS 3.0 :(
25
26
26
27
It is easy to isolate your code with aspect classes, that will be simply injected via cross-point functions, named `advices`, into your core application. The main idea is — code less, do more!
27
28
@@ -42,13 +43,12 @@ Usage
42
43
First add a maven repo link into your `repositories` block of module build file:
43
44
```groovy
44
45
mavenCentral()
45
-
maven { url "https://jitpack.io" }
46
46
```
47
47
Don't forget to add `mavenCentral()` due to some dependencies inside AspectJ-gradle module.
48
48
49
49
Add the plugin to your `buildscript`'s `dependencies` section:
transformLogFile 'ajc-transform.log' // default value
111
+
compilationLogFile 'ajc-compile.log' // default value
110
112
}
111
113
```
114
+
Note that you may not include all these options!
112
115
113
116
All the extension parameters are have default values (all of them are described above, except of includeJar/Aspects/ajcArgs options).
114
117
So no need to define them manually.
@@ -118,6 +121,7 @@ So no need to define them manually.
118
121
119
122
-`includeAllJars` Explicitly include all available jar-files into -inpath to proceed by AJ-compiler
120
123
-`includeJar` Name filter to include any jar/aar which name or path satisfies the filter
124
+
-`excludeJar` Name filter to exclude any jar/aar which name or path satisfies the filter
121
125
-`includeAspectsFromJar` Name filter to include any jar/aar with compiled binary aspects you wanna affect your project
122
126
-`ajcExtraArgs` Additional parameters for aspectj compiler
123
127
@@ -130,10 +134,12 @@ So no need to define them manually.
130
134
-`breakOnError` Allows to continue project building when ajc fails or throws any errors
131
135
-`experimental` Enables experimental ajc options: `-XhasMember` and `-Xjoinpoints:synchronization,arrayconstruction`. More details in <ahref="https://github.com/Archinamon/GradleAspectJ-Android/issues/18"target="_blank">issue #18</a>
132
136
137
+
-`buildTimeLog` Appends a BuildTimeListener to current module that prints time spent for every task in build flow, granularity in millis
138
+
133
139
-`transformLogFile` Defines name for the log file where all Aj compiler info writes to, new separated for Transformer
134
140
-`compilationLogFile` Defines name for the log file where all Aj compiler info writes to, new separated for CompileTask
135
141
136
-
Ext plugin config
142
+
Extended plugin config
137
143
-----------------
138
144
```groovy
139
145
apply plugin: 'com.archinamon.aspectj-ext'
@@ -147,6 +153,19 @@ Ext config:
147
153
Currently it has some limitations:
148
154
-`InstantRun` must be switched off (Plugin detects IR status and fails build if IR will be found).
149
155
156
+
Provider plugin config
157
+
-----------------
158
+
```groovy
159
+
apply plugin: 'com.archinamon.aspectj-provides'
160
+
```
161
+
162
+
Plugin-provider may be useful for that cases when you need to extract aspect-sources into separate module and include it on demand to that modules where you only need it.
163
+
Therefor this behavior will save you build-time due to bypassing aspectj-transformers in provide-only modules.
164
+
165
+
You ain't limited to describe as much provider-modules as you need and then include them using `includeAspectsFromJar` parameter in the module which code or dependencies you may want to augment.
166
+
167
+
With <ahref="https://github.com/Archinamon/AspectJExampleAndroid"target="_blank">example project</a> you could learn how to write such provider-module.
168
+
150
169
Working tests
151
170
-------
152
171
```groovy
@@ -182,6 +201,18 @@ So concrete rule is:
182
201
183
202
Changelog
184
203
---------
204
+
#### 3.1.1 -- Useful improvements
205
+
* added an extension trigger to append BuildTime logger for current module;
206
+
* back from grave — added exclude-filter for `aspectj-ext` plugin;
207
+
208
+
#### 3.1.0 -- Provider
209
+
* implemented `provides` plugin split to effectively extract aspects to external/sub modules;
0 commit comments