2

I have an IntelliJ android project which has two dependencies as module (ActionBarSherlock and FacebookSDK). So we can see three project folders in IDE. Also, each module has several jar libraries.

Here comes a new colleague and I want to share my project to him.

I gave him my GitHub repo url and he checked out. But I realized that IntelliJ does not have any file like .sln in Visual Studio (Just double click to open the IDE and every projects and related setups are in there). Besides, I had to create new project again to my colleague PC, import two other projects as module, add as Library, check dependency, and so on...

maven could be a solution but it sometimes ruins project setup.

Is there any simple way to make it?

Community
  • 1
  • 1
Youngjae
  • 24,352
  • 18
  • 113
  • 198

2 Answers2

1

This article on the JetBrains Support site goes over which files to commit to version control.

The short answer is:

Directory based project format (.idea directory)

This format is used by all the recent IDE versions by default. Here is what you need to share:

  • All the files under .idea directory in the project root except the workspace.xml and tasks.xml files which store user specific settings
  • All the .iml module files that can be located in different module directories (applies to IntelliJ IDEA)

Read the article fully, as it goes into things you may not want to put in version control.

dbrown0708
  • 4,544
  • 4
  • 25
  • 22
0

But I realized that IntelliJ does not have any file like .sln in Visual Studio

Not true, IntelliJ uses .iml files for this. More info on the IntelliJ Project Files documentation

For importing, have you friend open Intellij and from the upper window menu:

  1. VCS
  2. Checkout from version control
  3. Github

enter image description here

From there follow the wizard interface (dialogs with questions) and they'll be good to go.

petey
  • 16,914
  • 6
  • 65
  • 97
  • I already use GitHub as I described above, and I did exactly what you captured. as you know, the project dependencies and its related lib/*.jar relations are not maintained. It does not give three project folders and its dependencies. – Youngjae Dec 19 '13 at 18:44
  • And it also requires "Add as Library..." in /lib/*.jar files. – Youngjae Dec 19 '13 at 18:47
  • 1
    @Youngjae well add those libraries to git also – Saša Šijak Dec 19 '13 at 21:46
  • I did, and it was not the point. I didn't test but found an answer from above. thanks. – Youngjae Dec 20 '13 at 02:27