提交 96320e45 authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Include Java 9 implementation of CurrentTimestamp only in regular and embedded jars

上级 36ba6283
...@@ -501,9 +501,14 @@ public class Build extends BuildBase { ...@@ -501,9 +501,14 @@ public class Build extends BuildBase {
/** /**
* Add META-INF/versions for Java 9+. * Add META-INF/versions for Java 9+.
*
* @param includeCurrentTimestamp include CurrentTimestamp implementation
*/ */
private void addVersions() { private void addVersions(boolean includeCurrentTimestamp) {
copy("temp/META-INF/versions/9", files("src/java9/precompiled"), "src/java9/precompiled"); copy("temp/META-INF/versions/9", files("src/java9/precompiled"), "src/java9/precompiled");
if (!includeCurrentTimestamp) {
delete(files("temp/META-INF/versions/9/org/h2/util/CurrentTimestamp.class"));
}
} }
/** /**
...@@ -512,7 +517,7 @@ public class Build extends BuildBase { ...@@ -512,7 +517,7 @@ public class Build extends BuildBase {
@Description(summary = "Create the regular h2.jar file.") @Description(summary = "Create the regular h2.jar file.")
public void jar() { public void jar() {
compile(); compile();
addVersions(); addVersions(true);
manifest("H2 Database Engine", "org.h2.tools.Console"); manifest("H2 Database Engine", "org.h2.tools.Console");
FileList files = files("temp"). FileList files = files("temp").
exclude("temp/android/*"). exclude("temp/android/*").
...@@ -577,7 +582,7 @@ public class Build extends BuildBase { ...@@ -577,7 +582,7 @@ public class Build extends BuildBase {
@Description(summary = "Create h2client.jar with only the remote JDBC implementation.") @Description(summary = "Create h2client.jar with only the remote JDBC implementation.")
public void jarClient() { public void jarClient() {
compile(true, true, false); compile(true, true, false);
addVersions(); addVersions(false);
FileList files = files("temp"). FileList files = files("temp").
exclude("temp/org/h2/build/*"). exclude("temp/org/h2/build/*").
exclude("temp/org/h2/dev/*"). exclude("temp/org/h2/dev/*").
...@@ -604,7 +609,7 @@ public class Build extends BuildBase { ...@@ -604,7 +609,7 @@ public class Build extends BuildBase {
@Description(summary = "Create h2mvstore.jar containing only the MVStore.") @Description(summary = "Create h2mvstore.jar containing only the MVStore.")
public void jarMVStore() { public void jarMVStore() {
compileMVStore(true); compileMVStore(true);
addVersions(); addVersions(false);
manifestMVStore(); manifestMVStore();
FileList files = files("temp"); FileList files = files("temp");
files.exclude("*.DS_Store"); files.exclude("*.DS_Store");
...@@ -619,7 +624,7 @@ public class Build extends BuildBase { ...@@ -619,7 +624,7 @@ public class Build extends BuildBase {
@Description(summary = "Create h2small.jar containing only the embedded database.") @Description(summary = "Create h2small.jar containing only the embedded database.")
public void jarSmall() { public void jarSmall() {
compile(false, false, true); compile(false, false, true);
addVersions(); addVersions(true);
FileList files = files("temp"). FileList files = files("temp").
exclude("temp/android/*"). exclude("temp/android/*").
exclude("temp/org/h2/android/*"). exclude("temp/org/h2/android/*").
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论