Skip to content

Commit

Permalink
More
Browse files Browse the repository at this point in the history
  • Loading branch information
pjreiniger committed Dec 29, 2023
1 parent 46b70b6 commit 29a1768
Show file tree
Hide file tree
Showing 7 changed files with 87 additions and 5 deletions.
1 change: 1 addition & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,6 @@ import .bazelrc-buildbuddy
test --test_output=errors
build --java_language_version=17
build --java_runtime_version=roboriojdk_17
build --tool_java_language_version=17
build --tool_java_runtime_version=roboriojdk_17
build --registry=https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/
6 changes: 6 additions & 0 deletions generate/templates/tests/MODULE.bazel.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ local_path_override(

{{ mandatory_dependencies.rules_bzlmodrio_toolchain.module_dep() }}

{{mandatory_dependencies.rules_checkstyle.module_dep()}}
{{mandatory_dependencies.rules_pmd.module_dep()}}
{{mandatory_dependencies.rules_spotless.module_dep()}}
{{mandatory_dependencies.rules_wpiformat.module_dep()}}
{{ mandatory_dependencies.rules_wpi_styleguide.module_dep() }}

maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
maven.install(
artifacts = [
Expand Down
46 changes: 46 additions & 0 deletions generate/templates/tests/WORKSPACE.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ local_repository(

{{bazel_dependencies.rules_jvm_external.download_repository(indent_num=0, maybe=False)}}

load("@rules_jvm_external//:repositories.bzl", "rules_jvm_external_deps")

rules_jvm_external_deps()

load("@rules_jvm_external//:setup.bzl", "rules_jvm_external_setup")

rules_jvm_external_setup()

{{bazel_dependencies.rules_java.download_repository(indent_num=0, maybe=False)}}

{{ mandatory_dependencies.rules_bzlmodrio_toolchain.download_repository(0) }}

load("@rules_jvm_external//:defs.bzl", "maven_install")

Expand All @@ -24,3 +35,38 @@ maven_install(
],
repositories = ["https://repo1.maven.org/maven2"],
)


load("@rules_bzlmodrio_jdk//:maven_deps.bzl", "setup_legacy_setup_jdk_dependencies")

setup_legacy_setup_jdk_dependencies()

#####################
# Styleguide
#####################
{{ mandatory_dependencies.rules_pmd.maybe_local_repository() }}
{{ mandatory_dependencies.rules_checkstyle.maybe_local_repository() }}
{{ mandatory_dependencies.rules_spotless.maybe_local_repository() }}
{{ mandatory_dependencies.rules_wpiformat.maybe_local_repository() }}
{{ mandatory_dependencies.rules_wpi_styleguide.download_repository(0, native=False) }}

load("@rules_wpi_styleguide//dependencies:load_rule_dependencies.bzl", "load_styleguide_rule_dependencies")

load_styleguide_rule_dependencies()

load("@rules_wpi_styleguide//dependencies:load_dependencies.bzl", "load_styleguide_dependencies")

load_styleguide_dependencies()

load("@rules_wpi_styleguide//dependencies:load_transitive_dependencies.bzl", "load_styleguide_transitive_dependencies")

load_styleguide_transitive_dependencies()

load("@rules_wpi_styleguide//dependencies:setup_styleguide.bzl", "setup_styleguide")

setup_styleguide()

load("@rules_wpi_styleguide//dependencies:load_pins.bzl", "load_styleguide_pins")

load_styleguide_pins()
#####################
1 change: 1 addition & 0 deletions tests/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,6 @@ import .bazelrc-buildbuddy
test --test_output=errors
build --java_language_version=17
build --java_runtime_version=roboriojdk_17
build --tool_java_language_version=17
build --tool_java_runtime_version=roboriojdk_17
build --registry=https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/
4 changes: 2 additions & 2 deletions tests/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ local_path_override(
bazel_dep(name = "rules_java", version = "7.1.0")
bazel_dep(name = "rules_jvm_external", version = "5.3")
bazel_dep(name = "rules_bzlmodrio_toolchains", version = "2024-1")
bazel_dep(name = "rules_pmd", version = "6.43.0")
bazel_dep(name = "rules_checkstyle", version = "10.1")
bazel_dep(name = "rules_pmd", version = "6.43.0")
bazel_dep(name = "rules_spotless", version = "2.34.0")
bazel_dep(name = "rules_wpiformat", version = "2022.30")
bazel_dep(name = "rules_wpi_styleguide", version = "1.0.0")
bazel_dep(name = "rules_spotless", version = "2.34.0")

maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
maven.install(
Expand Down
33 changes: 31 additions & 2 deletions tests/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ http_archive(
url = "https://github.com/bzlmodRio/rules_bzlmodRio_toolchains/releases/download/2024-1/rules_bzlmodRio_toolchains-2024-1.tar.gz",
)


load("@rules_jvm_external//:defs.bzl", "maven_install")

maven_install(
Expand All @@ -50,7 +49,37 @@ maven_install(
repositories = ["https://repo1.maven.org/maven2"],
)


load("@rules_bzlmodrio_jdk//:maven_deps.bzl", "setup_legacy_setup_jdk_dependencies")

setup_legacy_setup_jdk_dependencies()

#####################
# Styleguide
#####################

http_archive(
name = "rules_wpi_styleguide",
sha256 = "c5c032e8e8b04cdd74d2a637c39e787156cd289d128cd9747b5c8c6d87d4f252",
url = "https://github.com/bzlmodRio/rules_wpi_styleguide/releases/download/1.0.0/rules_wpi_styleguide-1.0.0.tar.gz",
)

load("@rules_wpi_styleguide//dependencies:load_rule_dependencies.bzl", "load_styleguide_rule_dependencies")

load_styleguide_rule_dependencies()

load("@rules_wpi_styleguide//dependencies:load_dependencies.bzl", "load_styleguide_dependencies")

load_styleguide_dependencies()

load("@rules_wpi_styleguide//dependencies:load_transitive_dependencies.bzl", "load_styleguide_transitive_dependencies")

load_styleguide_transitive_dependencies()

load("@rules_wpi_styleguide//dependencies:setup_styleguide.bzl", "setup_styleguide")

setup_styleguide()

load("@rules_wpi_styleguide//dependencies:load_pins.bzl", "load_styleguide_pins")

load_styleguide_pins()
#####################
1 change: 0 additions & 1 deletion tests/java/basic/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,4 @@ java_test(
],
)


java_styleguide(name = "basic_test")

0 comments on commit 29a1768

Please sign in to comment.