diff --git a/.bazelrc b/.bazelrc new file mode 100644 index 00000000..1cdfac62 --- /dev/null +++ b/.bazelrc @@ -0,0 +1,5 @@ +# Enable Java 11 +build --java_language_version=11 + +# Enable Java 11 for J2CL compiler itself +build --tool_java_language_version=11 diff --git a/.bazelversion b/.bazelversion new file mode 100644 index 00000000..04edabda --- /dev/null +++ b/.bazelversion @@ -0,0 +1 @@ +5.4.1 \ No newline at end of file diff --git a/BUILD b/BUILD new file mode 100644 index 00000000..8c72d076 --- /dev/null +++ b/BUILD @@ -0,0 +1,10 @@ +load("@com_google_j2cl//build_defs:rules.bzl", "j2cl_library") + +j2cl_library( + name = 'gwt-nio', + srcs = glob(["src/main/java/**/*.java"]), + deps = [ + "@com_google_j2cl//:jsinterop-annotations-j2cl", + "@com_google_elemental2//:elemental2-core-j2cl", + ], +) \ No newline at end of file diff --git a/MODULE.bazel b/MODULE.bazel new file mode 100644 index 00000000..3d29b783 --- /dev/null +++ b/MODULE.bazel @@ -0,0 +1,4 @@ +module( + name = "gwt-nio", + repo_name = "com_vertispan_nio", +) diff --git a/WORKSPACE b/WORKSPACE new file mode 100644 index 00000000..c5751261 --- /dev/null +++ b/WORKSPACE @@ -0,0 +1,30 @@ +workspace(name = "com_vertispan_nio") + +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") + +# Load j2cl repository +http_archive( + name = "com_google_j2cl", + strip_prefix = "j2cl-20230718", + url = "https://github.com/google/j2cl/archive/refs/tags/v20230718.zip", +) + +load("@com_google_j2cl//build_defs:repository.bzl", "load_j2cl_repo_deps") +load_j2cl_repo_deps() + +load("@com_google_j2cl//build_defs:workspace.bzl", "setup_j2cl_workspace") +setup_j2cl_workspace() + +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") + +http_archive( + name = "com_google_elemental2", + strip_prefix = "elemental2-1.2.1", + url = "https://github.com/google/elemental2/archive/1.2.1.zip", +) + +load("@com_google_elemental2//build_defs:repository.bzl", "load_elemental2_repo_deps") +load_elemental2_repo_deps() + +load("@com_google_elemental2//build_defs:workspace.bzl", "setup_elemental2_workspace") +setup_elemental2_workspace() \ No newline at end of file diff --git a/src/main/java/java/nio/DoubleBuffer.java b/src/main/java/java/nio/DoubleBuffer.java index c6c2777f..ba01fc9c 100644 --- a/src/main/java/java/nio/DoubleBuffer.java +++ b/src/main/java/java/nio/DoubleBuffer.java @@ -79,6 +79,7 @@ public abstract class DoubleBuffer extends Buffer implements Comparable