// Copyright 2018 the original author or authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

[[third_party_integration]]
= Gradle & Third-party Tools

Gradle can be integrated with many different third-party tools such as IDEs and continuous integration platforms. Here we look at some of the more common ones as well as how to integrate your own tool with Gradle.

== IDEs

Android Studio::
This is a variant of IntelliJ IDEA, so the same integration features apply. It has built-in support for importing and building Gradle projects. You can also use the <<idea_plugin.adoc#,IDEA Plugin for Gradle>> to fine-tune the import process if that's necessary.

Eclipse::
If you want to work on a project within Eclipse that has a Gradle build, you should use the https://projects.eclipse.org/projects/tools.buildship[Eclipse Buildship plugin]. This will allow you to import and run Gradle builds. If you need to fine tune the import process so that the project loads correctly, you can use the <<eclipse_plugin.adoc#,Eclipse Plugins for Gradle>>. See https://discuss.gradle.org/t/buildship-1-0-18-is-now-available/19012[the associated release announcement] for details on what fine tuning you can do.

IntelliJ IDEA::
IDEA has built-in support for importing Gradle projects. If you need to fine tune the import process so that the project loads correctly, you can use the <<idea_plugin.adoc#,IDEA Plugin for Gradle>>.

NetBeans::
Add the http://plugins.netbeans.org/plugin/44510/gradle-support[Gradle Support] plugin to NetBeans in order to import and run projects with Gradle builds.

Visual Studio::
Gradle comes with a <<native_software.adoc#native_binaries:visual_studio,Visual Studio plugin>> that will generate link:{groovyDslPath}/org.gradle.ide.visualstudio.VisualStudioProject.html[VisualStudioProject] and link:{groovyDslPath}/org.gradle.ide.visualstudio.VisualStudioSolution.html[VisualStudioSolution] files for your native projects.

== Continuous integration

We have dedicated guides showing you how to integrate a Gradle project with the following CI platforms:

 * https://guides.gradle.org/executing-gradle-builds-on-jenkins[Jenkins]
 * https://guides.gradle.org/executing-gradle-builds-on-teamcity[TeamCity]
 * https://guides.gradle.org/executing-gradle-builds-on-travisci[Travis CI]

Even if you don't use one of the above, you can almost certainly configure your CI platform to use the <<gradle_wrapper.adoc#,Gradle Wrapper>> scripts.

== How to integrate with Gradle

There are two main ways to integrate a tool with Gradle:

 * The Gradle build uses the tool
 * The tool executes the Gradle build

The former case is typically <<custom_plugins.adoc#,implemented as a Gradle plugin>>. The latter can be accomplished by embedding Gradle through <<embedding.adoc#,the Tooling API>>.
