|

How to make Eclipse aware of Gradle dependencies

Some time ago, I blogged about Gradle support in Eclipse. One feature I failed to spot was an automatic import of Gradle dependencies. The pain point for me was that whenever I successfully built the project (in Eclipse using the Gradle plugin!) I was still getting compilation errors as the IDE wouldn’t automatically add the relevant JARs…

|

Gradle: Copy selected files without using the exclude pattern

Copying files in Gradle is very intuitive. It’s easy enough to filter out unwanted files using the exclude pattern. Example (see documentation): task copyTaskWithPatterns(type: Copy) { from ‘src/main/webapp’ into ‘build/explodedWar’ include ‘**/*.html’ include ‘**/*.jsp’ exclude { details -> details.file.name.endsWith(‘.html’) && details.file.text.contains(‘staging’) } } The problem occurs, when you only want to copy specific files and…

|

Gradle build: bootstrap class path not set in conjunction with -source 1.7

Building of a Gradle project yields the following warning: :compileJavawarning: [options] bootstrap class path not set in conjunction with -source 1.7 1 warning That happens whenever the project is compiled to be compatible with an older Java version compared to the installed JDK (Java 8 in my case). build.gradle apply plugin: ‘java’ sourceCompatibility = 1.7 … The warning…