gradle-eclipse

In gradle how to use sources from relative path outside of project

喜夏-厌秋 提交于 2019-12-12 11:09:07
问题 I have following 2 projects placed adjacent to each other in some folder and I want to include specific sources from a non-gradle project into this project with the structure as follows. rootfolder/ my-gradle-project/ src/main/java build.gradle my-non-gradle-project/ src/main/java/com/example/utils In build.gradle why would following not work ? What alternative do I have ? Additionally I need to included specific java sources from the non-gradle project. build.gradle sourceSets.main.java

How does gradle-eclipse plugin deal with dependsOn

ε祈祈猫儿з 提交于 2019-12-12 06:12:00
问题 How does Gradle Eclipse plugin figure constructs as below compileJava.dependsOn xjc 回答1: Gradle-Eclipse plugin doesn't really do anything special with Gradle constructs. You'd be able to open Gradle Tasks view and run your 'xjc' or 'compileJava' task. You can also add your 'compileJava' or any other project to tasks to run after import in the Gradle Import wizard and have this task running every time Gradle project is refreshed (right-click on the project -> Gradle -> Refresh All). Whenever

Problems during build when referencing static lib directory gradle

怎甘沉沦 提交于 2019-12-12 00:09:40
问题 I use a build.gradle file which needs to reference some jar files which are neither available on a public nor an internal repository. Because of that I put the jar files into a lib directory which is below my Eclipse project: dependencies { ... compile files('lib/*.jar') } This works fine as long as I run or export my program from within Eclipse. But when I try gradle build gradle fails with this error: Could not normalize path for file 'C:\Workspaces\MyProject\project\lib\*.jar'. I changed

Migrating from ant + ivy to gradle

孤人 提交于 2019-12-11 11:54:10
问题 I read many good things about gradle so I get impressed. Many people are enthusiastic how easy is to develop with gradle. They all emphasize the multi-project capabilies of gradle. I already have a main project with some subprojects. The outside dependencies are defined in all the project's own ivy.xml. And the module interdependencies are defined in both eclipse's .classpath file and ant build.xml parallelly. This way i can build for IDE and can create a runtime with ant. Is there a simple

Could not fetch model of type 'EclipseProject' using Gradle

倖福魔咒の 提交于 2019-12-11 09:05:38
问题 I have a gradle project which is configured and working fine in Windows environment but the same is not working when I try and run it in Mac. Project and Environment Configuration: Gradle 2.5/2.6 Eclipse Luna/Mars Gradle Project using SpringBoot The gradle project is checked out from the SVN but when I run the project as Gradle project it gives me the below error: Configuration with name 'default' not found. Could not fetch model of type 'EclipseProject' using Gradle installation '/Users/vips

Gradle jar with jersey dependencies produces MessageBodyReader not found for media type=application/json

大城市里の小女人 提交于 2019-12-10 17:31:46
问题 I've written a Jersey client which communicates with a 3rd party service and it works if I run it from Eclipse but it throws a MessageBodyProviderNotFoundException if I run the jar file. My build.gradle: // Apply the java plugin to add support for Java apply plugin: 'java' version = '1.0' // In this section you declare where to find the dependencies of your project repositories { jcenter() } //create a single Jar with all dependencies task createJar(type: Jar) { manifest { attributes

what is the purpose of “rawproto” files?

无人久伴 提交于 2019-12-09 13:07:19
问题 In Android Studio, in ~/StudioProjects/$APPLICATION/build/android-profile/ , there are many files profile-*.rawproto , e.g., profile-2017-04-25-18-19-51-815.rawproto . I have never seen the file suffix .rawproto , does this suggest a certain kind of file, and if so, what is this file generally used for? With some digging online, it seems to be related to Gradle in IntelliJ/Studio, which is a sensible conclusion since it is in the build directory. But this is all the information I am able to

Gradle with Eclipse - incomplete .classpath when multiple sourcesets

雨燕双飞 提交于 2019-12-08 19:16:22
问题 I have a gradle build script with a handful of source sets that all have various dependencies defined (some common, some not), and I'm trying to use the Eclipse plugin to let Gradle generate .project and .classpath files for Eclipse, but I can't figure out how to get all the dependency entries into .classpath ; for some reason, quite few of the external dependencies are actually added to .classpath , and as a result the Eclipse build fails with 1400 errors (building with gradle works fine). I

Eclipse Gradle Plugin 'could not fetch model of type'

主宰稳场 提交于 2019-12-04 00:16:40
问题 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 'EclipseProject' using Gradle distribution 'https://services.gradle.org/distributions/gradle-2.0-bin.zip'. Has anyone else run into this error? I can get to the URL specified to download the file myself. So, network connectivity shouldn't be the problem. 回答1:

How to add gradle generated source folder to Eclipse project?

邮差的信 提交于 2019-12-03 12:37:21
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 way to automate this? Thanks. Andreas Schmid You can easily add the generated folder manually to the classpath by eclipse { classpath { file.whenMerged { cp -> cp.entries.add( new org.gradle.plugins.ide.eclipse.model.SourceFolder('gen/main/java', null) ) } } } whereby null as a second constructor arg means that Eclipse should put the compiled