File tree 1 file changed +18
-2
lines changed
1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -151,5 +151,21 @@ def __closing__(self):
151
151
self .arc .zf .writestr (arcname , content + os .linesep )
152
152
153
153
def mx_post_parse_cmd_line (opts ):
154
- dist = mx .distribution ('TRUFFLE_TEST' )
155
- dist .set_archiveparticipant (TruffleArchiveParticipant ())
154
+
155
+ def _uses_truffle_dsl_processor (dist ):
156
+ for dep in dist .deps :
157
+ if dep .name .startswith ('TRUFFLE_DSL_PROCESSOR' ):
158
+ return True
159
+ truffle_dsl_processors = set ()
160
+ def visit (dep , edge ):
161
+ if dep is not dist and dep .isJavaProject ():
162
+ for ap in dep .annotation_processors ():
163
+ if ap .name .startswith ('TRUFFLE_DSL_PROCESSOR' ):
164
+ truffle_dsl_processors .add (ap )
165
+ dist .walk_deps (visit = visit )
166
+ return len (truffle_dsl_processors ) != 0
167
+
168
+ for d in mx .dependencies ():
169
+ if d .isJARDistribution ():
170
+ if _uses_truffle_dsl_processor (d ):
171
+ d .set_archiveparticipant (TruffleArchiveParticipant ())
You can’t perform that action at this time.
0 commit comments