2025-01-10 11:35:44 +01:00
|
|
|
# Copyright 2010-2025 Google LLC
|
2023-01-05 13:38:42 +01:00
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
|
#
|
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
#
|
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
2022-12-30 10:21:01 +01:00
|
|
|
# Description: java wrapping of the C++ code at ../
|
|
|
|
|
|
2023-03-03 12:12:37 +04:00
|
|
|
load("@contrib_rules_jvm//java:defs.bzl", "java_junit5_test")
|
2025-09-16 16:25:04 +02:00
|
|
|
load("//bazel:swig_java.bzl", "java_wrap_cc")
|
2022-12-30 10:21:01 +01:00
|
|
|
|
2025-09-16 16:25:04 +02:00
|
|
|
java_wrap_cc(
|
2022-12-30 10:21:01 +01:00
|
|
|
name = "modelbuilder",
|
2025-09-16 16:25:04 +02:00
|
|
|
srcs = ["modelbuilder.swig"],
|
2023-01-05 13:38:42 +01:00
|
|
|
package = "com.google.ortools.modelbuilder",
|
2022-12-30 10:21:01 +01:00
|
|
|
swig_includes = [
|
|
|
|
|
"//ortools/base:base_swig",
|
2025-09-16 16:25:04 +02:00
|
|
|
"//ortools/util/java:vector.swig",
|
2022-12-30 10:21:01 +01:00
|
|
|
],
|
|
|
|
|
visibility = ["//visibility:public"],
|
2025-10-16 12:58:23 +02:00
|
|
|
deps = [
|
|
|
|
|
"//ortools/linear_solver:linear_solver_cc_proto",
|
|
|
|
|
"//ortools/linear_solver/wrappers:model_builder_helper",
|
|
|
|
|
],
|
2023-01-05 13:38:42 +01:00
|
|
|
)
|
2023-03-03 12:12:37 +04:00
|
|
|
|
|
|
|
|
java_junit5_test(
|
|
|
|
|
name = "ModelBuilderTest",
|
|
|
|
|
srcs = ["ModelBuilderTest.java"],
|
|
|
|
|
test_class = "com.google.ortools.modelbuilder.ModelBuilderTest",
|
|
|
|
|
deps = [
|
|
|
|
|
"//ortools/java/com/google/ortools:Loader",
|
|
|
|
|
"//ortools/java/com/google/ortools/modelbuilder",
|
|
|
|
|
"//ortools/linear_solver/java:modelbuilder",
|
|
|
|
|
"@maven//:com_google_truth_truth",
|
2025-10-16 12:58:23 +02:00
|
|
|
"@maven//:org_junit_jupiter_junit_jupiter_api",
|
|
|
|
|
"@maven//:org_junit_jupiter_junit_jupiter_engine",
|
|
|
|
|
"@maven//:org_junit_jupiter_junit_jupiter_params",
|
|
|
|
|
"@maven//:org_junit_platform_junit_platform_launcher",
|
|
|
|
|
"@maven//:org_junit_platform_junit_platform_reporting",
|
2023-03-03 12:12:37 +04:00
|
|
|
],
|
2023-03-08 11:23:36 +01:00
|
|
|
)
|