Java hamcrest-all v1.3 兼容什么版本?
What version of Java hamcrest-all v1.3 compatible with?
我找不到关于这个问题的任何信息:
Java hamcrest-all v1.3 兼容什么版本?
在 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 build.xml
...
中的 javac
命令进一步支持了这一点
<javac srcdir="@{srcdir}" destdir="build/temp/@{modulename}-${version}.jar.contents"
debug="${debug}" target="1.5" includeantruntime="false">
...
</javac>
因此,看起来 Hamcrest 1.3 与 Java 1.5 兼容,但根据作者的说法...
it should run on 1.4 and 1.3 JVMs with some features unavailable
相比之下,Hamcrest 2.x 假定 Java 1.7,来自 build.gradle:
import static org.gradle.api.JavaVersion.VERSION_1_7
sourceCompatibility = VERSION_1_7
targetCompatibility = VERSION_1_7
我找不到关于这个问题的任何信息: Java hamcrest-all v1.3 兼容什么版本?
在 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 build.xml
...
javac
命令进一步支持了这一点
<javac srcdir="@{srcdir}" destdir="build/temp/@{modulename}-${version}.jar.contents"
debug="${debug}" target="1.5" includeantruntime="false">
...
</javac>
因此,看起来 Hamcrest 1.3 与 Java 1.5 兼容,但根据作者的说法...
it should run on 1.4 and 1.3 JVMs with some features unavailable
相比之下,Hamcrest 2.x 假定 Java 1.7,来自 build.gradle:
import static org.gradle.api.JavaVersion.VERSION_1_7
sourceCompatibility = VERSION_1_7
targetCompatibility = VERSION_1_7