Gradle plugin for support of all Eclipse files for a project
Questions tagged [gradle-eclipse]
182 questions
808
votes
21 answers
How to add local .jar file dependency to build.gradle file?
I have tried to add my local .jar file dependency to my build.gradle file:
apply plugin: 'java'
sourceSets {
main {
java {
srcDir 'src/model'
}
}
}
dependencies {
runtime files('libs/mnist-tools.jar',…

letter Q
- 14,735
- 33
- 79
- 118
57
votes
17 answers
Peer not authenticated while importing Gradle project in eclipse
While I am importing gradle project in eclipse, it is giving me this error.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'test'.
> Could not resolve all dependencies for configuration…

MrTambourineMan
- 1,025
- 1
- 11
- 19
48
votes
4 answers
Is there any way to integrate Eclipse with Gradle in Android project?
I have Android project with standard build.gradle (also I added android annotations).
Also I installed Gradle plugin (from http://dist.springsource.org/release/GRECLIPSE/e4.3/) to my Eclipse (Kepler) and converted project to Gradle project.…

MAGx2
- 3,149
- 7
- 33
- 63
40
votes
12 answers
Running Gradle project via Eclipse errors "system Cannot find System Java Compiler"
When I run Gradle project via Eclipse I get below error.
system Cannot find System Java Compiler.
Ensure that you have installed a JDK (not just a JRE) and configured your JAVA_HOME system variable to point to the according directory.
Could not…

surekha
- 401
- 1
- 4
- 4
34
votes
9 answers
Execution failed for task ':compileJava'. > invalid source release: 1.7
I am using :
gradle-2.3
javac -version = 1.7
jre = 1.7
regedit shows it is pointing to 1.7.
But I am still getting below error
Execution failed for task ':compileJava'. > invalid source release: 1.7
Please let me know how to fix it.

BdEngineer
- 2,929
- 4
- 49
- 85
26
votes
3 answers
View Gradle dependency tree in Eclipse
Is it possible to visualize the dependency tree from inside of Eclipse (e.g. the output of gradle dependencies)? Expanding the Gradle Dependencies tree in Eclipse is a flat view and does not show dependencies for other projects (e.g. if I have a…

Chris K
- 1,703
- 1
- 14
- 26
25
votes
18 answers
Eclipse Gradle Plugin 'could not fetch model of type'
I am running Eclipse Luna on OS X with Gradle IDE 3.6.1 and anytime I try to select a project from the gradle tasks panel I get the following error:
org.eclipse.osgi.internal.framework.EquinoxConfiguration$1
Could not fetch model of type…

Michael
- 2,460
- 3
- 27
- 47
21
votes
3 answers
How to start with STS and Gradle
Installed Kepler-based STS 3.4.0.RELEASE (current latest version) and the Gradle Support package from the Dashboard Extensions. Now I would like to create a Spring MVC project from scratch that uses Gradle as its build and dependency management tool…

Giulio Piancastelli
- 15,368
- 5
- 42
- 62
12
votes
6 answers
Gradle eclipse task doesn't add proper gradle nature
I have the following project structure:
root-gradle (build.gradle)
project-group1 (no build file)
project1 (build.gradle)
project2 (build.gradle)
...
project-group2 (no build file)
...
So happens that I have to recreate Eclipse projects…

ATrubka
- 3,982
- 5
- 33
- 52
12
votes
1 answer
Import code style to Eclipse using Gradle
For the sake of code style consistency I'd like to apply a set of formatting rules and save actions automatically to my Eclipse project.
I have encapsulated these rules in an EPF file using File > Export > Preferences in Eclipse.
Is there a way to…

Matthias Braun
- 32,039
- 22
- 142
- 171
11
votes
1 answer
Gradle, rt.jar access restriction
I am using a Gradle build that contains among other things:
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'eclipse'
repositories {
flatDir { dirs "${System.env.JAVA_HOME}/jre/lib" }
}
dependencies {
compile name: 'rt'
}
It builds,…

benji
- 2,331
- 6
- 33
- 62
11
votes
2 answers
Gradle + Buildship - Switch dependency between JAR and projects
I'm having some trouble configuring Buildship for Eclipse the way I want. I currently have > 50 projects always open in Eclipse, but I want to move to having only the projects I am actively working on in Eclipse, and the other projects would use a…

Cydrick Trudel
- 9,957
- 8
- 41
- 63
11
votes
3 answers
Creating Gradle project in eclipse is stuck
I am new to gradle, and I have a problem that the eclipse got stuck when I create a gradle project
This is what I install in my eclipse luna
And I am trying to create a gradle project in eclipse
The process got stuck!
PS: I tried I create a new…

JaskeyLam
- 15,405
- 21
- 114
- 149
10
votes
3 answers
Running Spring Boot application through Eclipse picks up test classes
I am developing a Spring Boot application using STS with the Gradle plugin.
I have a different configuration for tests, to prevent our Selenium tests from having to login.
So in src/test/java/etc I have something like…

Martin Wilson
- 3,386
- 1
- 24
- 29
10
votes
3 answers
How to add gradle generated source folder to Eclipse project?
My gradle project generates some java code inside gen/main/java using annotation processor. When I import this project into Eclipse, Eclipse will not automatically add gen/main/java as source folder to buildpath. I can do it manually. But is there a…

codefx
- 9,872
- 16
- 53
- 81