-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
36 lines (33 loc) · 1.08 KB
/
build.gradle
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
33
34
35
36
allprojects {
apply plugin: 'java'
sourceCompatibility = 1.6
targetCompatibility = 1.6
}
apply plugin: 'eclipse'
repositories {
mavenCentral()
}
dependencies {
compile 'org.luaj:luaj-jse:3.0.1'
compile 'org.apache.bcel:bcel:5.2'
}
// For applying correct eclipse configuration of the version of java.
project.afterEvaluate {
// use jre lib matching version used by project, not the workspace default
if (project.sourceCompatibility != null) {
def target = project.sourceCompatibility.toString()
def containerPrefix = "org.eclipse.jdt.launching.JRE_CONTAINER"
def containerSuffix
if (target =~ /1.[4-5]/) {
containerSuffix = '/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-' + target
} else if (target =~ /1.[6-8]/) {
containerSuffix = '/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-' + target
}
if (containerSuffix != null) {
project.eclipse.classpath {
containers.removeAll { it.startsWith(containerPrefix) }
containers.add(containerPrefix + containerSuffix)
}
}
}
}