{"id":13810712,"url":"https://github.com/bazelbuild/rules_groovy","last_synced_at":"2025-05-03T11:33:55.856Z","repository":{"id":49019453,"uuid":"53970366","full_name":"bazelbuild/rules_groovy","owner":"bazelbuild","description":"Groovy rules for Bazel","archived":false,"fork":false,"pushed_at":"2024-03-21T01:11:15.000Z","size":101,"stargazers_count":11,"open_issues_count":20,"forks_count":29,"subscribers_count":31,"default_branch":"master","last_synced_at":"2024-08-05T03:01:49.691Z","etag":null,"topics":["bazel","bazel-rules","groovy"],"latest_commit_sha":null,"homepage":null,"language":"Starlark","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bazelbuild.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null}},"created_at":"2016-03-15T18:53:29.000Z","updated_at":"2024-05-09T17:08:51.000Z","dependencies_parsed_at":"2024-03-21T02:30:15.501Z","dependency_job_id":"aeca34bc-54fd-4bb4-87d7-e01f3aca2904","html_url":"https://github.com/bazelbuild/rules_groovy","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bazelbuild%2Frules_groovy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bazelbuild%2Frules_groovy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bazelbuild%2Frules_groovy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bazelbuild%2Frules_groovy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bazelbuild","download_url":"https://codeload.github.com/bazelbuild/rules_groovy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224360099,"owners_count":17298319,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bazel","bazel-rules","groovy"],"created_at":"2024-08-04T03:00:23.984Z","updated_at":"2024-11-12T23:14:45.588Z","avatar_url":"https://github.com/bazelbuild.png","language":"Starlark","readme":"[![Build status](https://badge.buildkite.com/5745498acd50b9811f2bdb2fc26defd3c3f01bed96ffe6fb5a.svg)](https://buildkite.com/bazel/rules-groovy-postsubmit)\n\n# 📣 [Unmaintained] Groovy Rules\n\n\u003e [!WARNING]\n\u003e Due to an absence of any maintainers, this repository is archived and currently unmaintained.\n\u003e\n\u003e **We discourage any new dependencies on the contents of this repository.**\n\u003e\n\u003e If you, or your organization, are interested in revitalizing this project by taking over its maintenance, we welcome your initiative.\n\u003e To discuss the process of un-archiving and assuming ownership of this repository, please reach out to us via email at `bazel-contrib@googlegroups.com` or join the conversation on our Slack workspace in the `#rules` channel.\n\u003e You can sign up for Slack access at [https://slack.bazel.build](https://slack.bazel.build).\n\n\u003cdiv class=\"toc\"\u003e\n  \u003ch2\u003eRules\u003c/h2\u003e\n  \u003cul\u003e\n    \u003cli\u003e\u003ca href=\"#groovy_library\"\u003egroovy_library\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#groovy_and_java_library\"\u003egroovy_and_java_library\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#groovy_binary\"\u003egroovy_binary\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#groovy_junit_test\"\u003egroovy_junit_test\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#spock_test\"\u003espock_test\u003c/a\u003e\u003c/li\u003e\n  \u003c/ul\u003e\n\u003c/div\u003e\n\n## Overview\n\nThese build rules are used for building [Groovy](http://www.groovy-lang.org/)\nprojects with Bazel. Groovy libraries may interoperate with and depend on Java\nlibraries and vice-versa.\n\n\u003ca name=\"setup\"\u003e\u003c/a\u003e\n## Setup\n\nTo be able to use the Groovy rules, you must provide bindings for the following\ntargets:\n\n  * `//external:groovy-sdk`, pointing at the\n    [Groovy SDK binaries](http://www.groovy-lang.org/download.html)\n  * `//external:groovy`, pointing at the Groovy core language jar\n  * `//external:junit`, pointing at JUnit (only required if using the test rules)\n  * `//external:spock`, pointing at Spock (only required if using `spock_test`)\n\nThe easiest way to do so is to add the following to your `WORKSPACE` file:\n\n```python\nload(\"@bazel_tools//tools/build_defs/repo:http.bzl\", \"http_archive\")\nhttp_archive(\n    name = \"io_bazel_rules_groovy\",\n    url = \"https://github.com/bazelbuild/rules_groovy/archive/0.0.6.tar.gz\",\n    sha256 = \"21c7172786623f280402d3b3a2fc92f36568afad5a4f6f5ea38fd1c6897aecf8\",\n    strip_prefix = \"rules_groovy-0.0.6\",\n)\nload(\"@io_bazel_rules_groovy//groovy:repositories.bzl\", \"rules_groovy_dependencies\")\nrules_groovy_dependencies()\n```\n\n\u003ca name=\"basic-example\"\u003e\u003c/a\u003e\n## Basic Example\n\nSuppose you have the following directory structure for a simple Groovy and Java\napplication:\n\n```\n[workspace]/\n    WORKSPACE\n    src/main/groovy/\n        app/\n            BUILD\n            GroovyApp.groovy\n        lib/\n            BUILD\n            GroovyLib.groovy\n            JavaLib.java\n    src/test/groovy/\n        lib/\n            BUILD\n            LibTest.groovy\n```\n\nThen, to build the code under src/main/groovy/lib/, your\n`src/main/groovy/lib/BUILD` can look like this:\n\n```python\nload(\"@io_bazel_rules_groovy//groovy:groovy.bzl\", \"groovy_library\")\n\ngroovy_library(\n    name = \"groovylib\",\n    srcs = glob([\"*.groovy\"]),\n    visibility = [\"//visibility:public\"],\n    deps = [\n        \":javalib\",\n    ],\n)\n\njava_library(\n    name = \"javalib\",\n    srcs = glob([\"*.java\"]),\n)\n```\n\nFor simplicity, you can combine Groovy and Java sources into a single library\nusing `groovy_and_java_library`. Note that this allows the Groovy code to\nreference the Java code, but not vice-versa. Your `src/main/groovy/lib/BUILD`\nfile would then look like this:\n\n```python\nload(\"@io_bazel_rules_groovy//groovy:groovy.bzl\", \"groovy_and_java_library\")\n\ngroovy_and_java_library(\n    name = \"lib\",\n    srcs = glob([\"*.groovy\", \"*.java\"]),\n)\n```\n\nTo build the application under src/main/groovy/app, you can define a binary\nusing `groovy_binary` as follows:\n\n```python\nload(\"@io_bazel_rules_groovy//groovy:groovy.bzl\", \"groovy_binary\")\n\ngroovy_binary(\n    name = \"GroovyApp\",\n    srcs = glob([\"*.groovy\"]),\n    main_class = \"app.GroovyApp\",\n    deps = [\n         \"//src/main/groovy/lib:groovylib\",\n    ],\n)\n```\n\nFinally, you can write tests in Groovy using `groovy_test`. The `srcs` of this\nrule will be converted into names of class files that are passed to JUnit. For\nthis to work, the test sources must be under src/test/groovy or src/test/java.\nTo build the test under src/test/groovy/lib, your BUILD file would look like\nthis:\n\n```python\nload(\"@io_bazel_rules_groovy//groovy:groovy.bzl\", \"groovy_test\", \"groovy_library\")\n\n\ngroovy_library(\n  name = \"testlib\",\n  srcs = glob([\"*.groovy\"]),\n)\n\ngroovy_test(\n  name = \"LibTest\",\n  srcs = [\"LibTest.groovy\"],\n  deps = [\":testlib\"],\n)\n```\n\nIf you're using JUnit or Spock, see\n\u003ca href=\"#groovy_junit_test\"\u003egroovy_junit_test\u003c/a\u003e or\n\u003ca href=\"#spock_test\"\u003espock_test\u003c/a\u003e for wrappers that make testing with these\nsystems slightly more convenient.\n\n\u003ca name=\"groovy_library\"\u003e\u003c/a\u003e\n## groovy_library\n\n```python\ngroovy_library(name, srcs, deps, **kwargs)\n```\n\n\u003ctable class=\"table table-condensed table-bordered table-params\"\u003e\n  \u003ccolgroup\u003e\n    \u003ccol class=\"col-param\" /\u003e\n    \u003ccol class=\"param-description\" /\u003e\n  \u003c/colgroup\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth colspan=\"2\"\u003eAttributes\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eName, required\u003c/code\u003e\n        \u003cp\u003eA unique name for this rule.\u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003esrcs\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eList of labels, required\u003c/code\u003e\n        \u003cp\u003eList of .groovy source files used to build the library.\u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003edeps\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eList of labels or .jar files, optional\u003c/code\u003e\n        \u003cp\u003e\n          List of other libraries to be included on the compile-time classpath\n          when building this library.\n        \u003c/p\u003e\n        \u003cp\u003e\n          These can be either other `groovy_library` targets, `java_library`\n          targets, `groovy_and_java_library` targets, or raw .jar files.\n        \u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003e**kwargs\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003esee \u003ca href=\"http://bazel.io/docs/be/java.html#java_import\"\u003ejava_binary\u003c/a\u003e\u003c/code\u003e\n        \u003cp\u003e\n          The other arguments of this rule will be passed to the `java_import`\n          that wraps the groovy library.\n        \u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003ca name=\"groovy_and_java_library\"\u003e\u003c/a\u003e\n## groovy\\_and\\_java\\_library\n\n```python\ngroovy_and_java_library(name, srcs, deps, **kwargs)\n```\n\n\u003ctable class=\"table table-condensed table-bordered table-params\"\u003e\n  \u003ccolgroup\u003e\n    \u003ccol class=\"col-param\" /\u003e\n    \u003ccol class=\"param-description\" /\u003e\n  \u003c/colgroup\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth colspan=\"2\"\u003eAttributes\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eName, required\u003c/code\u003e\n        \u003cp\u003eA unique name for this rule.\u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003esrcs\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eList of labels, required\u003c/code\u003e\n        \u003cp\u003eList of .groovy and .java source files used to build the library.\u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003edeps\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eList of labels or .jar files, optional\u003c/code\u003e\n        \u003cp\u003e\n          List of other libraries to be included on the compile-time classpath\n          when building this library.\n        \u003c/p\u003e\n        \u003cp\u003e\n          These can be either other `groovy_library` targets, `java_library`\n          targets, `groovy_and_java_library` targets, or raw .jar files.\n        \u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003e**kwargs\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003esee \u003ca href=\"http://bazel.io/docs/be/java.html#java_import\"\u003ejava_binary\u003c/a\u003e\u003c/code\u003e\n        \u003cp\u003e\n          The other arguments of this rule will be passed to the `java_import`\n          that wraps the groovy library.\n        \u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003ca name=\"groovy_binary\"\u003e\u003c/a\u003e\n## groovy_binary\n\n```python\ngroovy_binary(name, main_class, srcs, deps, **kwargs)\n```\n\n\u003ctable class=\"table table-condensed table-bordered table-params\"\u003e\n  \u003ccolgroup\u003e\n    \u003ccol class=\"col-param\" /\u003e\n    \u003ccol class=\"param-description\" /\u003e\n  \u003c/colgroup\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth colspan=\"2\"\u003eAttributes\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eName, required\u003c/code\u003e\n        \u003cp\u003eA unique name for this rule.\u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003emain_class\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eString, required\u003c/code\u003e\n        \u003cp\u003e\n          The name of either a class containing a `main` method or a Groovy\n          script file to use as an entry point (see\n          \u003ca href=\"http://www.groovy-lang.org/structure.html#_scripts_versus_classes\"\u003e\n          here\u003c/a\u003e for more details on scripts vs. classes).\n        \u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003esrcs\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eList of labels, required\u003c/code\u003e\n        \u003cp\u003eList of .groovy source files used to build the application.\u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003edeps\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eList of labels or .jar files, optional\u003c/code\u003e\n        \u003cp\u003e\n          List of other libraries to be included on both the compile-time\n          classpath when building this application and the runtime classpath\n          when executing it.\n        \u003c/p\u003e\n        \u003cp\u003e\n          These can be `groovy_library` targets, `java_library` targets,\n          `groovy_and_java_library` targets, or raw .jar files.\n        \u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003e**kwargs\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003esee \u003ca href=\"http://bazel.io/docs/be/java.html#java_binary\"\u003ejava_binary\u003c/a\u003e\u003c/code\u003e\n        \u003cp\u003e\n          The other arguments of this rule will be passed to the `java_binary`\n          underlying the `groovy_binary`.\n        \u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003ca name=\"groovy_test\"\u003e\u003c/a\u003e\n## groovy_test\n\n```python\ngroovy_test(name, deps, srcs, data, resources, jvm_flags, size, tags)\n```\n\n\u003ctable class=\"table table-condensed table-bordered table-params\"\u003e\n  \u003ccolgroup\u003e\n    \u003ccol class=\"col-param\" /\u003e\n    \u003ccol class=\"param-description\" /\u003e\n  \u003c/colgroup\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth colspan=\"2\"\u003eAttributes\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eName, required\u003c/code\u003e\n        \u003cp\u003eA unique name for this rule.\u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003esrcs\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eList of labels, required\u003c/code\u003e\n        \u003cp\u003e\n          List of .groovy source files whose names will be converted to classes\n          passed to JUnitCore.\n        \u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003edeps\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eList of labels or .jar files, optional\u003c/code\u003e\n        \u003cp\u003e\n          List of libraries to be included on both the compile-time classpath\n          when building this test and on the runtime classpath when executing it.\n        \u003c/p\u003e\n        \u003cp\u003e\n          These can be `groovy_library` targets, `java_library` targets,\n          `groovy_and_java_library` targets, or raw .jar files.\n        \u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003eresources\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eList of labels, optional\u003c/code\u003e\n        \u003cp\u003e\n          A list of data files to include on the test's classpath. This is\n          accomplished by creating a `java_library` containing only the specified\n          resources and including that library in the test's dependencies.\n        \u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003ejvm_flags\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eList of strings, optional\u003c/code\u003e\n        \u003cp\u003e\n          A list of flags to embed in the wrapper script generated for running\n          this binary.\n        \u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003ca name=\"groovy_junit_test\"\u003e\u003c/a\u003e\n## groovy_junit_test\n\n```python\ngroovy_junit_test(name, tests, deps, groovy_srcs, java_srcs, data, resources, jvm_flags, size, tags)\n```\n\n\u003ctable class=\"table table-condensed table-bordered table-params\"\u003e\n  \u003ccolgroup\u003e\n    \u003ccol class=\"col-param\" /\u003e\n    \u003ccol class=\"param-description\" /\u003e\n  \u003c/colgroup\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth colspan=\"2\"\u003eAttributes\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eName, required\u003c/code\u003e\n        \u003cp\u003eA unique name for this rule.\u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003etests\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eList of labels, required\u003c/code\u003e\n        \u003cp\u003e\n          List of .groovy source files that will be used as test specifications\n          that will be executed by JUnit.\n        \u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003egroovy_srcs\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eList of labels, optional\u003c/code\u003e\n        \u003cp\u003e\n          List of additional .groovy source files that will be used to build the\n          test.\n        \u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003ejava_srcs\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eList of labels, optional\u003c/code\u003e\n        \u003cp\u003e\n          List of additional .java source files that will be used to build the\n          test.\n        \u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003edeps\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eList of labels or .jar files, optional\u003c/code\u003e\n        \u003cp\u003e\n          List of libraries to be included on both the compile-time classpath\n          when building this test and on the runtime classpath when executing it.\n        \u003c/p\u003e\n        \u003cp\u003e\n          These can be `groovy_library` targets, `java_library` targets,\n          `groovy_and_java_library` targets, or raw .jar files.\n        \u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003eresources\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eList of labels, optional\u003c/code\u003e\n        \u003cp\u003e\n          A list of data files to include on the test's classpath. This is\n          accomplished by creating a `java_library` containing only the specified\n          resources and including that library in the test's dependencies.\n        \u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003ejvm_flags\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eList of strings, optional\u003c/code\u003e\n        \u003cp\u003e\n          A list of flags to embed in the wrapper script generated for running\n          this binary.\n        \u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003ca name=\"spock_test\"\u003e\u003c/a\u003e\n## spock_test\n\n```python\nspock_test(name, specs, deps, groovy_srcs, java_srcs, data, resources, jvm_flags, size, tags)\n```\n\n\u003ctable class=\"table table-condensed table-bordered table-params\"\u003e\n  \u003ccolgroup\u003e\n    \u003ccol class=\"col-param\" /\u003e\n    \u003ccol class=\"param-description\" /\u003e\n  \u003c/colgroup\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth colspan=\"2\"\u003eAttributes\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eName, required\u003c/code\u003e\n        \u003cp\u003eA unique name for this rule.\u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003especs\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eList of labels, required\u003c/code\u003e\n        \u003cp\u003e\n          List of .groovy source files that will be used as test specifications\n          that will be executed by JUnit.\n        \u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003egroovy_srcs\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eList of labels, optional\u003c/code\u003e\n        \u003cp\u003e\n          List of additional .groovy source files that will be used to build the\n          test.\n        \u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003ejava_srcs\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eList of labels, optional\u003c/code\u003e\n        \u003cp\u003e\n          List of additional .java source files that will be used to build the\n          test.\n        \u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003edeps\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eList of labels or .jar files, optional\u003c/code\u003e\n        \u003cp\u003e\n          List of libraries to be included on both the compile-time classpath\n          when building this test and on the runtime classpath when executing it.\n        \u003c/p\u003e\n        \u003cp\u003e\n          These can be `groovy_library` targets, `java_library` targets,\n          `groovy_and_java_library` targets, or raw .jar files.\n        \u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003eresources\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eList of labels, optional\u003c/code\u003e\n        \u003cp\u003e\n          A list of data files to include on the test's classpath. This is\n          accomplished by creating a `java_library` containing only the specified\n          resources and including that library in the test's dependencies.\n        \u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003ejvm_flags\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eList of strings, optional\u003c/code\u003e\n        \u003cp\u003e\n          A list of flags to embed in the wrapper script generated for running\n          this binary.\n        \u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n","funding_links":[],"categories":["Additional language support"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbazelbuild%2Frules_groovy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbazelbuild%2Frules_groovy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbazelbuild%2Frules_groovy/lists"}