0

Interceptors work when I declare them in same package, but when I declare them in different package, they are not being registered and never being called.

How can I use interceptors declared in different packages?

tutuDajuju
  • 10,307
  • 6
  • 65
  • 88
Ravi Teja Gudapati
  • 2,809
  • 2
  • 13
  • 16

1 Answers1

1

If you are just using a single library with parts to have multiple groups, you can do it like this. You create a library (in /lib) containing all the groups. For example: library rest_api

Then, in the main file where you start redstone:

app.redstoneSetUp([#rest_api]);

Make sure you import the library first. The analyzer will most likely give you a warning for unused import, but you can ignore it by adding

// ignore: unused_import

before the line or at the end of the line that produces the warning.

Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567
Pacane
  • 20,273
  • 18
  • 60
  • 97