File: eclipse.gradle

package info (click to toggle)
gradle 4.4.1-13
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 85,440 kB
  • sloc: java: 319,966; xml: 14,356; javascript: 4,838; cpp: 4,200; ansic: 1,025; sh: 300; makefile: 65; asm: 17; jsp: 17; objc: 10
file content (32 lines) | stat: -rw-r--r-- 1,769 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
allprojects {
    apply plugin: 'eclipse'

    plugins.withType(JavaPlugin) {
        eclipse {
            classpath {
                file.whenMerged { classpath ->
                    //There are classes in here not designed to be compiled, but just used in our testing
                    classpath.entries.removeAll { it.path.contains('src/integTest/resources') }
                    //Workaround for some projects referring to themselves as dependent projects
                    classpath.entries.removeAll { it.path.contains("$project.name") && it.kind=='src' }
                    // Remove references to libraries in the build folder
                    classpath.entries.removeAll { it.path.contains("$project.name/build") && it.kind=='lib' }
                    // Remove references to other project's binaries
                    classpath.entries.removeAll { it.path.contains("/subprojects") && it.kind == 'lib' }
                    // Add needed resources for running gradle as a non daemon java application
                    classpath.entries.add(new org.gradle.plugins.ide.eclipse.model.SourceFolder("build/generated-resources/main", null))
                    classpath.entries.add(new org.gradle.plugins.ide.eclipse.model.SourceFolder("build/generated-resources/test", null))
                }
            }
            jdt {
                sourceCompatibility = '1.8'
                targetCompatibility = '1.8'
                javaRuntimeName = 'JavaSE-1.8'
                file.withProperties { properties ->
                    // Eclipse's view of projects treat circular dependencies as errors by default
                    properties["org.eclipse.jdt.core.circularClasspath"] = "warning"
                }
            }
        }
    }
}