提交 02c1775b authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Add META-INF/versions to all non-Android jars that use Bits

上级 220d414e
...@@ -524,16 +524,22 @@ public class Build extends BuildBase { ...@@ -524,16 +524,22 @@ public class Build extends BuildBase {
return files; return files;
} }
/**
* Add META-INF/versions for Java 9+.
*/
private void addVersions() {
copy("temp/META-INF/versions/9", files("src/java9/precompiled"), "src/java9/precompiled");
}
/** /**
* Create the regular h2.jar file. * Create the regular h2.jar file.
*/ */
@Description(summary = "Create the regular h2.jar file.") @Description(summary = "Create the regular h2.jar file.")
public void jar() { public void jar() {
compile(); compile();
FileList files = files("src/java9/precompiled"); addVersions();
copy("temp/META-INF/versions/9", files, "src/java9/precompiled");
manifest("H2 Database Engine", "org.h2.tools.Console"); manifest("H2 Database Engine", "org.h2.tools.Console");
files = files("temp"). FileList files = files("temp").
exclude("temp/android/*"). exclude("temp/android/*").
exclude("temp/org/h2/android/*"). exclude("temp/org/h2/android/*").
exclude("temp/org/h2/build/*"). exclude("temp/org/h2/build/*").
...@@ -596,6 +602,7 @@ public class Build extends BuildBase { ...@@ -596,6 +602,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();
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/*").
...@@ -622,6 +629,7 @@ public class Build extends BuildBase { ...@@ -622,6 +629,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();
manifestMVStore(); manifestMVStore();
FileList files = files("temp"); FileList files = files("temp");
files.exclude("*.DS_Store"); files.exclude("*.DS_Store");
...@@ -636,6 +644,7 @@ public class Build extends BuildBase { ...@@ -636,6 +644,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();
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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论