4
sourceCompatibility
및 targetCompatibility
의 속성은 특정 JRE 버전으로 설정하는 경우에도, "설치의 JRE"의 아래에 단지 <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER" exported="true"/>
로 genarated 할 것을 JRE_CONTAINER
에 대한 classpathentry, 기본 JRE 버전 Eclipse 설정이 항상 내 프로젝트에서 사용하려는 JRE 버전과 일치하지는 않습니다.로 명시 JRE 컨테이너
gradle이 gradle eclipse
과 함께 실행될 때 JRE_CONTAINER를 특정 버전으로 설정하려면 어떻게해야합니까? 내 경우 에
apply plugin: 'java'
apply plugin: 'eclipse'
ext {
target = "1.5"
}
def jreContainer = 'org.eclipse.jdt.launching.JRE_CONTAINER'
if (target == '1.4' || target == '1.5') {
jreContainer += '/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-' + target
} else if (target == '1.6' || target == '1.7') {
jreContainer += '/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-' + target
}
eclipse {
classpath {
containers.clear()
containers.add(jreContainer)
}
}
. 다른 해결책은 http://stackoverflow.com/questions/17110502에서 내 대답을 참조하십시오. –