Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have written a custom build script for my android app. I included some "easy" preprocessing, so I can define comments like

//#ifdef something
... CODE
//#endif

and get rid of the Code part if configured so. The Problem is, that after preprocessing I don't need some modules anymore, so I leave them out. What remains is the import statement for that module which bites me, if I want to build the app finally. I'm searching for a way within my preprocessing, to organize the java Imports inside my script after preprocessing happens. Any Solution without the need for additional "clicks" is very welcome.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
205 views
Welcome To Ask or Share your Answers For Others

1 Answer

Sometimes you're really need preprocessor (quite rare). But you could actually achieve same goal with right build process.

Anyway back to the question you could use next technique:

//#ifdef something
... IMPORTS
//#endif

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...