我找不到有关该问题的任何信息: 什么版本的Java hamcrest-all v1.3兼容?
答案 0 :(得分:1)
在Hamcrest 1.3的源代码中,文件BUILDING.txt
包含以下语句:
--[ Build requirements ]-------------------------------------
* JDK 1.5
Note: that this is a buildtime dependency for 1.5 specific
features. However the final built jars should run on 1.4
and 1.3 JVMs with some features unavailable.
Ant javac
...
build.xml
命令进一步支持了这一点
<javac srcdir="@{srcdir}" destdir="build/temp/@{modulename}-${version}.jar.contents"
debug="${debug}" target="1.5" includeantruntime="false">
...
</javac>
因此,看起来Hamcrest 1.3与Java 1.5兼容,但据作者说......
它应该在1.4和1.3 JVM上运行,其中一些功能不可用
相比之下,Hamcrest 2.x假设来自build.gradle:
的Java 1.7import static org.gradle.api.JavaVersion.VERSION_1_7
sourceCompatibility = VERSION_1_7
targetCompatibility = VERSION_1_7