Skip to content

Commit

Permalink
build with gradle-intellij-plugin
Browse files Browse the repository at this point in the history
I've updated how to use this new setup for importing into IntelliJ. Due
to an issue with how intellij does import you unfortunately have to
revert the imports changes to .idea after import to get the
preconfigured runconfiguration. There's also a couple ugly hacks to support
multi-plugin projects which will be fixed when
 JetBrains/intellij-platform-gradle-plugin#17 is fixed
in a few days.
  • Loading branch information
patflynn committed Nov 19, 2015
1 parent 9b06905 commit 890cbc4
Show file tree
Hide file tree
Showing 30 changed files with 116 additions and 754 deletions.
24 changes: 9 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
/out
.idea/workspace.xml
.idea/libraries/Gradle*
.gradle/
build/
common-lib/.gradle/
common-lib/build/
core-plugin/.gradle/
core-plugin/build/
core-plugin/core-plugin.zip
google-account-plugin/.gradle/
google-account-plugin/.idea/inspectionProfiles/
google-account-plugin/build/
google-account-plugin/google-account-plugin.zip
idea-IC/
.idea/modules.xml
.idea/misc.xml
.idea/gradle.xml
.idea/codeStyleSettings.xml
.idea/compiler.xml
.idea/shelf/
.idea/libraries/
.idea/.name
**/*.iml
.gradle/
**/build/
2 changes: 1 addition & 1 deletion .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions .idea/ct4ij.iml

This file was deleted.

10 changes: 0 additions & 10 deletions .idea/libraries/git4idea.xml

This file was deleted.

13 changes: 0 additions & 13 deletions .idea/libraries/gradle.xml

This file was deleted.

12 changes: 0 additions & 12 deletions .idea/libraries/groovy_jps_plugin.xml

This file was deleted.

10 changes: 0 additions & 10 deletions .idea/libraries/idea_junit.xml

This file was deleted.

9 changes: 0 additions & 9 deletions .idea/libraries/properties.xml

This file was deleted.

79 changes: 0 additions & 79 deletions .idea/misc.xml

This file was deleted.

11 changes: 0 additions & 11 deletions .idea/modules.xml

This file was deleted.

11 changes: 0 additions & 11 deletions .idea/runConfigurations/Core_IJ_Community.xml

This file was deleted.

6 changes: 3 additions & 3 deletions .idea/uiDesigner.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 6 additions & 26 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,37 +41,17 @@ Other useful targets while developing include:
* $ ./gradlew test: run tests
* $ ./gradlew check: run static analysis tools
* $ ./gradlew clean: remove all build artifacts

Gradle builds fail on Windows due to reliance on the fetchIdea.sh shell script.
This script simply downloads and installs IntelliJ IDEA code for building against
and shouldn't be too hard to port to Windows. See
[Issue 167](https://github.com/GoogleCloudPlatform/gcloud-intellij/issues/167).
As a quick workaround you can manually download and install the relevant
IDEA distribution and comment out the loadIdea task in
[build.gradle](https://github.com/GoogleCloudPlatform/gcloud-intellij/blob/master/build.gradle).

On Windows you should be able to build the plugins inside IntelliJ by
selecting "Prepare All Plugin Modules For Deployment" from the Build menu.
* $ ./gradlew runIdea: run IntelliJ preconfigured with the plugins from this project.

## Configuring and Debugging in IntelliJ

### Import Project

To work in IDEA, just "Open" the cloud-tools-for-intellij directory
(the root directory cloned from Github) from the IDEA opening screen.

Alternately you can select "Import Project" from the IDEA opening screen and
choose the root build.gradle file. In this case, IDE features for IDEA plugin
development may not work; and run and debug configurations will not
be available from within the IDE. However, you can run and debug unit tests.

### Optional: Downloading source for IDEA to debug.

[Download the IDEA source tarball from JetBrains](http://www.jetbrains.org/display/IJOS/Download)
into your home (or any other convenient) directory. Extract it and
add the resulting directory (usually something like ideaIC-141.1532.4)
in the Sourcepath tab of Project Structure > SDKs for the IntelliJ CE 141.1532 SDK.

1. 'New project from existing sources'
1. Select the root build.gradle file to import
1. Git revert changes to the .idea folder because IDEA Gradle import blows it away
(https://youtrack.jetbrains.com/issue/IDEA-146295)
1. Run or debug the **Cloud Tools on IntelliJ** run configuration

## Contributing code

Expand Down
Loading

0 comments on commit 890cbc4

Please sign in to comment.