0

I would like to create targets & macros like in iOS on the Android side.
I read the doc but impossible to understand

1/ how to get targets/schemes like in iOS:
Targets

2/ how to get preprocessor macros like in iOS:
Preprocessors macros
Code macros

I also checked that ticket and that ticket but it never mentions how to create the macros part and how to compile the differents APK variants like the targets in iOS...

EDIT 1:
For the variant and the flavor, I found exactly the video I needed: Video variant & flavor

For the icon for each variant : Video icon change by variants

For the preprocessoring, I tried to install Manifold but impossible to understand how to install it...

EDIT 2:
I found that way to use the preprocessor, but it seems not to work...

ΩlostA
  • 2,501
  • 5
  • 27
  • 63
  • 1
    This kind of macro is not specific to iOS, it is a specificity of c-like language. Before compilation there is first pass on called pre processor to process the macros = replace code or select (#if) code to be used. Look for : “Java preprocessing “ you may find some workaround. You may also use a c pre processor with Java code but that mean you have to preprocess the code to other have code which will be the source code for Java. – Ptit Xav Mar 07 '22 at 18:15
  • preprocessors (the things that evaluate macros) and macros aren't really a thing in Java or Kotlin. There's other ways to achieve similar results, but they do it differently. What those ways are really depends on what you're trying to do. For example in the screenshot above, you'd define the FST_BRAND to a value in your BuidConfig variable and do a standard if statement. You can find some old Java preprocessors out there, but the idea is largely abandoned- it just doesn't work for the language and tools. – Gabe Sechan Mar 07 '22 at 18:34
  • @PtitXav for the Java preprocessing, I found the Manifold solution, but impossible to understand how to install it... – ΩlostA Mar 10 '22 at 16:54

0 Answers0