Tuesday, 27 August 2013

Allow the same project to be opened and built with Android Studio OR IntelliJ IDEA

Allow the same project to be opened and built with Android Studio OR
IntelliJ IDEA

I develop an SDK, and would like to be able to check in module files for
both IntelliJ IDEA and Android Studio. I've devised the following
solution, with one missing piece:
Create module files ending in -intellij-idea for the main project, and
each module.
Create build.gradle files, and use the "sourceset" directive to use the
old style src and res directory structure.
The problem is that the project information is always stored in a
directory called ".idea". Before, I could have two IPR files, such as
my-project-android-studio.ipr and my-project-intellij-idea.ipr. I could
then open one in Android Studio, and the other in Intellij IDEA, but the
actual source would remain the same.
How can I accomplish this? If there is a way to force Android Studio to
generate IPR files instead of the ridiculous .idea directory, that would
be optimal.

No comments:

Post a Comment