Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
In my case, it turned out to be easier to make exactly two projects with different code.
I also want to know how to do it the right way. It's a pity there is no preprocessor, as in a sish.
stackoverflow.com/a/4557275/2809617
You may want to look into configuring different artifacts
https://www.jetbrains.com/idea/help/artifacts.html
for the various versions of the lib and then restructuring your code to isolate the version specific code in subclasses/components that are only including in the relevant artifact. This may be impractical, especially in an existing project, but less trouble than writing a plugin. Maven has similar functionality via classifiers.
In android studio, I made an auto build of 2 versions. At first, of course, it was difficult to deal with gradle, but in the end it turned out to be not so difficult.
malroy.ru/gradle-part-1
tools.android.com/tech-docs/new-build-system/user-guide
https://www.youtube.com/watch?v=NZJTYPLb0iE
https://www.youtube .com/watch?v=7JDEK4wkN5I
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question