├── bootstrap └── settings.gradle ├── benchmark └── bench │ ├── fibo.output │ ├── hash.output │ ├── lists.output │ ├── ary.output │ ├── nestedloop.output │ ├── spellcheck.output │ ├── strcat.output │ ├── sumcol.output │ ├── hash2.output │ ├── heapsort.output │ ├── hello.output │ ├── sieve.output │ ├── ackermann.output │ ├── wc.output │ ├── echo.ouput │ ├── except.output │ ├── matrix.output │ ├── objinst.output │ ├── hello.groovy │ ├── hello.java │ ├── moments.output │ ├── fibo.groovy │ ├── ackermann.groovy │ ├── fibo.java │ ├── ackermann.java │ ├── takfp.java │ ├── random.groovy │ ├── harmonic.java │ ├── nestedloop.java │ ├── sumcol.java │ ├── strcat.java │ ├── wordfreq.groovy │ ├── ary.groovy │ ├── ary.java │ └── sieve.java ├── .gitattributes ├── subprojects ├── groovy-templates │ └── src │ │ ├── test │ │ └── resources │ │ │ └── includes │ │ │ ├── hello.html │ │ │ ├── hello-escaped.txt │ │ │ ├── hello_fr_FR.tpl │ │ │ ├── hello.tpl │ │ │ └── typecheckedinclude.tpl │ │ └── spec │ │ └── test-resources │ │ ├── raw.txt │ │ ├── to_be_escaped.txt │ │ ├── main.tpl │ │ ├── locale_include.tpl │ │ ├── locale_include_fr_FR.tpl │ │ └── other_template.tpl ├── groovy-json │ └── src │ │ └── test │ │ └── resources │ │ └── groovy9802.json ├── groovy-jmx │ └── src │ │ └── spec │ │ └── doc │ │ └── assets │ │ └── img │ │ ├── catalina.png │ │ ├── jconsole.png │ │ ├── oc4jpie.png │ │ └── jconsole-implicit-export.png ├── groovy-groovysh │ └── src │ │ ├── spec │ │ └── doc │ │ │ └── assets │ │ │ └── img │ │ │ ├── repl_cd.png │ │ │ ├── repl_del.png │ │ │ ├── widget1.png │ │ │ ├── widget2.png │ │ │ ├── widget3.png │ │ │ ├── repl_alias.png │ │ │ ├── repl_alias2.png │ │ │ ├── repl_colors.png │ │ │ ├── repl_echo.png │ │ │ ├── repl_grep.png │ │ │ ├── repl_import.png │ │ │ ├── repl_less.png │ │ │ ├── repl_nano.png │ │ │ ├── repl_pipe.png │ │ │ ├── repl_pipe2.png │ │ │ ├── repl_prnt.png │ │ │ ├── repl_show.png │ │ │ ├── repl_slurp.png │ │ │ ├── repl_sort.png │ │ │ ├── repl_ttop.png │ │ │ ├── repl_types.png │ │ │ ├── repl_types2.png │ │ │ ├── repl_colors2.png │ │ │ ├── repl_colors3.png │ │ │ ├── repl_colors4.png │ │ │ ├── repl_console.png │ │ │ ├── repl_evaluate.png │ │ │ ├── repl_history.png │ │ │ ├── repl_inspect.png │ │ │ ├── repl_typedef.png │ │ │ ├── repl_unalias.png │ │ │ ├── repl_classloader.png │ │ │ ├── repl_exceptions.png │ │ │ ├── repl_inspect_gui.png │ │ │ ├── repl_nano_help.png │ │ │ ├── repl_slurp_url.png │ │ │ └── repl_pipe_builtin.png │ │ ├── main │ │ └── resources │ │ │ └── nanorc │ │ │ ├── jlessrc │ │ │ └── jnanorc │ │ └── test │ │ └── resources │ │ └── groovy7777script ├── groovy-console │ ├── src │ │ ├── spec │ │ │ └── doc │ │ │ │ └── assets │ │ │ │ └── img │ │ │ │ ├── cstbrowser.png │ │ │ │ ├── GroovyConsole.png │ │ │ │ ├── astbrowser_source.png │ │ │ │ ├── gconsole-toolbar.png │ │ │ │ ├── astbrowser_bytecode.png │ │ │ │ ├── gconsole-sc-with-visu.png │ │ │ │ └── gconsole-sc-without-visu.png │ │ └── main │ │ │ └── resources │ │ │ └── groovy │ │ │ └── console │ │ │ └── ui │ │ │ ├── icons │ │ │ ├── cut.png │ │ │ ├── clear.png │ │ │ ├── cross.png │ │ │ ├── disk.png │ │ │ ├── find.png │ │ │ ├── page.png │ │ │ ├── cup_go.png │ │ │ ├── cut_red.png │ │ │ ├── font_up.png │ │ │ ├── printer.png │ │ │ ├── arrow_redo.png │ │ │ ├── arrow_undo.png │ │ │ ├── book_next.png │ │ │ ├── folder_add.png │ │ │ ├── font_down.png │ │ │ ├── page_copy.png │ │ │ ├── page_paste.png │ │ │ ├── script_go.png │ │ │ ├── book_previous.png │ │ │ ├── bullet_green.png │ │ │ ├── folder_page.png │ │ │ ├── information.png │ │ │ ├── package_add.png │ │ │ ├── page_refresh.png │ │ │ ├── page_white_go.png │ │ │ ├── text_replace.png │ │ │ ├── resultset_next.png │ │ │ ├── page_white_select.png │ │ │ ├── page_white_stack.png │ │ │ ├── resultset_previous.png │ │ │ └── script_lightning.png │ │ │ └── ConsoleIcon.png │ └── NOTICE ├── groovy-swing │ └── src │ │ └── spec │ │ └── doc │ │ └── assets │ │ └── img │ │ └── SwingBuilder001.png ├── groovy-ant │ └── src │ │ └── test-resources │ │ └── org │ │ └── codehaus │ │ └── groovy │ │ └── ant │ │ ├── commons-lang3-3.18.0.jar │ │ └── params.groovy ├── groovy-docgenerator │ └── src │ │ └── main │ │ └── resources │ │ └── org │ │ └── apache │ │ └── groovy │ │ └── docgenerator │ │ └── groovy.ico ├── groovy-groovydoc │ └── src │ │ └── main │ │ └── resources │ │ └── org │ │ └── codehaus │ │ └── groovy │ │ └── tools │ │ └── groovydoc │ │ └── gstringTemplates │ │ └── topLevel │ │ └── inherit.gif └── groovy-jsr223 │ └── src │ └── main │ └── resources │ └── META-INF │ └── services │ └── javax.script.ScriptEngineFactory ├── src ├── bin │ └── groovy.icns ├── spec │ └── doc │ │ └── assets │ │ ├── img │ │ ├── a380.jpg │ │ ├── native.jpg │ │ ├── outdir.png │ │ ├── setup.png │ │ ├── b797-hoax.jpg │ │ ├── variables.jpg │ │ ├── fileassociation.png │ │ ├── usageMessageSpec.png │ │ └── additionalmodules.png │ │ └── css │ │ └── view-example.css ├── test │ └── groovy │ │ ├── groovy │ │ ├── util │ │ │ ├── i18n_en.properties │ │ │ ├── i18n.properties │ │ │ ├── i18n_fr.properties │ │ │ └── system.properties │ │ ├── script │ │ │ ├── scriptHelloWorld.groovy │ │ │ ├── scriptMethodReflection.groovy │ │ │ ├── scriptWithClosure.groovy │ │ │ └── scriptArgs.groovy │ │ └── annotations │ │ │ └── package-info.groovy │ │ └── bugs │ │ ├── Groovy4393BugV1.foogroovy │ │ ├── Groovy4104B.java │ │ └── scriptForGroovy3934.groovy └── test-resources │ ├── fail │ ├── Break_01x.groovy │ ├── List_01.groovy │ ├── Expression_01.groovy │ ├── Expression_02.groovy │ ├── Continue_01x.groovy │ ├── Expression_03.groovy │ ├── Expression_04.groovy │ ├── Expression_05.groovy │ ├── Expression_06.groovy │ ├── Expression_08.groovy │ ├── Expression_09.groovy │ ├── MethodCall_01x.groovy │ ├── Number_03x.groovy │ ├── Number_04x.groovy │ ├── Number_05x.groovy │ ├── ParExpression_01x.groovy │ ├── ParExpression_03x.groovy │ ├── UnexpectedCharacter_01x.groovy │ ├── AbstractMethod_04x.groovy │ ├── Expression_07.groovy │ ├── Modifier_01x.groovy │ ├── Modifier_07.groovy │ ├── Number_01x.groovy │ ├── ParExpression_02x.groovy │ ├── Parentheses_01.groovy │ ├── AbstractMethod_05x.groovy │ ├── AbstractMethod_06x.groovy │ ├── For_01.groovy │ ├── For_02.groovy │ ├── Modifier_03x.groovy │ ├── Var_01x.groovy │ ├── Array_02x.groovy │ ├── ClosureListExpression_02.groovy │ ├── ClosureListExpression_03.groovy │ ├── MethodDeclaration_05x.groovy │ ├── Modifier_02x.groovy │ ├── Number_02x.groovy │ ├── String_01x.groovy │ ├── String_02x.groovy │ ├── UnaryOperator_01x.groovy │ ├── UnaryOperator_02x.groovy │ ├── Var_02x.groovy │ ├── Array_01x.groovy │ ├── Array_03x.groovy │ ├── Assert_01x.groovy │ ├── Break_02x.groovy │ ├── MethodDeclaration_04x.groovy │ ├── String_03.groovy │ ├── String_04.groovy │ ├── Continue_02x.groovy │ ├── ThreadSafe_01x.groovy │ ├── AbstractMethod_01x.groovy │ ├── AbstractMethod_03x.groovy │ ├── Array_04x.groovy │ ├── Modifier_04x.groovy │ ├── SwitchExpression_10x.groovy │ ├── ClosureListExpression_01.groovy │ ├── ConstructorDeclaration_01.groovy │ ├── Import_01x.groovy │ ├── LocalVariableDeclaration_01.groovy │ ├── Modifier_05x.groovy │ ├── Void_01x.groovy │ ├── AbstractMethod_02x.groovy │ ├── DoWhile_01x.groovy │ ├── Import_02x.groovy │ ├── RecordDeclaration_03x.groovy │ ├── SealedTypeDeclaration_04x.groovy │ ├── MethodDeclaration_02x.groovy │ ├── MethodDeclaration_03x.groovy │ ├── SealedTypeDeclaration_05x.groovy │ ├── AnnotationDeclaration_01x.groovy │ ├── SealedTypeDeclaration_03x.groovy │ ├── ClassDeclaration_01x.groovy │ ├── RecordDeclaration_12x.groovy │ ├── RecordDeclaration_04x.groovy │ ├── SealedTypeDeclaration_02x.groovy │ ├── Super_02x.groovy │ ├── Trait_01.groovy │ ├── RecordDeclaration_02x.groovy │ └── RecordDeclaration_05x.groovy │ ├── core │ ├── Closure_01.groovy │ ├── Closure_02.groovy │ ├── GString_04.groovy │ ├── GString_05.groovy │ ├── Closure_03.groovy │ ├── GString_06.groovy │ ├── Throw_01.groovy │ ├── Annotation_01.groovy │ ├── Closure_04.groovy │ ├── ImportDeclaration_05.groovy │ ├── Annotation_02.groovy │ ├── Closure_05.groovy │ ├── Closure_07.groovy │ ├── ImportDeclaration_01.groovy │ ├── ImportDeclaration_02.groovy │ ├── Annotation_05.groovy │ ├── PackageDeclaration_01.groovy │ ├── PackageDeclaration_03.groovy │ ├── PackageDeclaration_06.groovy │ ├── Annotation_04.groovy │ ├── Annotation_06.groovy │ ├── PackageDeclaration_02.groovy │ ├── Annotation_03.groovy │ ├── Annotation_07.groovy │ ├── Expression_20.groovy │ ├── PackageDeclaration_04.groovy │ ├── PackageDeclaration_05.groovy │ ├── Expression_02.groovy │ ├── Literal_03.groovy │ ├── While_02x.groovy │ └── ImportDeclaration_06.groovy │ ├── bugs │ ├── BUG-GROOVY-8216.groovy │ ├── BUG-GROOVY-9427.groovy │ ├── BUG-GROOVY-8161.groovy │ ├── BUG-GROOVY-8150.groovy │ ├── BUG-GROOVY-9433.groovy │ ├── BUG-GROOVY-5318.groovy │ └── BUG-GROOVY-9692.groovy │ ├── META-INF │ └── services │ │ └── java.lang.System$LoggerFinder │ └── groovy │ └── bugs │ ├── groovy7799 │ └── EE.groovy │ └── groovy9236 │ └── Type.groovy ├── xdocs └── images │ └── groovy-logo.png ├── gradle ├── verification-keyring.gpg └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── licenses ├── asm-JARJAR.txt ├── antlr4-JARJAR.txt ├── hamcrest-BINZIP.txt ├── xstream-BINZIP.txt ├── asciidoc-style-SRC-DOC.txt ├── jquery-js-DOC-SRC.txt ├── jsr166y-BINZIP.txt ├── normalize-stylesheet-BINZIP-DOC-SRC.txt ├── junit-BINZIP.txt ├── jsr223-BINZIP-SRC.txt ├── readme.txt └── jline3-BINZIP-SRC.txt ├── notices ├── javaparser-BINZIP.txt ├── antlr4-JARJAR.txt ├── NOTICE-BASE ├── silkicons-BINZIP-SRC.txt ├── concurrentreferencehashmap-SRC.txt ├── concurrentlinkedhashmap-SRC.txt ├── junit-BINZIP.txt ├── NOTICE-JARJAR ├── readme.txt ├── openbeans-GROOID.txt ├── NOTICE-GROOID └── NOTICE-GROOIDJARJAR ├── .gitignore ├── .asf.yaml ├── CONTRIBUTING.md ├── .muse └── config.toml ├── NOTICE ├── jitpack.yml ├── CODE_OF_CONDUCT.md └── config ├── checkstyle └── codeHeader.txt └── bnd └── groovy-all.bnd /bootstrap/settings.gradle: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /benchmark/bench/fibo.output: -------------------------------------------------------------------------------- 1 | 34 2 | -------------------------------------------------------------------------------- /benchmark/bench/hash.output: -------------------------------------------------------------------------------- 1 | 4999 2 | -------------------------------------------------------------------------------- /benchmark/bench/lists.output: -------------------------------------------------------------------------------- 1 | 10000 2 | -------------------------------------------------------------------------------- /benchmark/bench/ary.output: -------------------------------------------------------------------------------- 1 | 1000 1000000 2 | -------------------------------------------------------------------------------- /benchmark/bench/nestedloop.output: -------------------------------------------------------------------------------- 1 | 4096 2 | -------------------------------------------------------------------------------- /benchmark/bench/spellcheck.output: -------------------------------------------------------------------------------- 1 | zuul 2 | -------------------------------------------------------------------------------- /benchmark/bench/strcat.output: -------------------------------------------------------------------------------- 1 | 60000 2 | -------------------------------------------------------------------------------- /benchmark/bench/sumcol.output: -------------------------------------------------------------------------------- 1 | 50050000 2 | -------------------------------------------------------------------------------- /benchmark/bench/hash2.output: -------------------------------------------------------------------------------- 1 | 1 9999 10 99990 2 | -------------------------------------------------------------------------------- /benchmark/bench/heapsort.output: -------------------------------------------------------------------------------- 1 | 0.9990640718 2 | -------------------------------------------------------------------------------- /benchmark/bench/hello.output: -------------------------------------------------------------------------------- 1 | hello world 2 | -------------------------------------------------------------------------------- /benchmark/bench/sieve.output: -------------------------------------------------------------------------------- 1 | Count: 1028 2 | -------------------------------------------------------------------------------- /benchmark/bench/ackermann.output: -------------------------------------------------------------------------------- 1 | Ack(3,4): 125 2 | -------------------------------------------------------------------------------- /benchmark/bench/wc.output: -------------------------------------------------------------------------------- 1 | 12500 68500 3048000 2 | -------------------------------------------------------------------------------- /benchmark/bench/echo.ouput: -------------------------------------------------------------------------------- 1 | server processed 190000 bytes 2 | -------------------------------------------------------------------------------- /benchmark/bench/except.output: -------------------------------------------------------------------------------- 1 | Exceptions: HI=25000 / LO=25000 2 | -------------------------------------------------------------------------------- /benchmark/bench/matrix.output: -------------------------------------------------------------------------------- 1 | 270165 1061760 1453695 1856025 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | 3 | *.bat text eol=crlf 4 | *.jar binary -------------------------------------------------------------------------------- /subprojects/groovy-templates/src/test/resources/includes/hello.html: -------------------------------------------------------------------------------- 1 | Hello unescaped! -------------------------------------------------------------------------------- /src/bin/groovy.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/src/bin/groovy.icns -------------------------------------------------------------------------------- /subprojects/groovy-templates/src/test/resources/includes/hello-escaped.txt: -------------------------------------------------------------------------------- 1 | Hello ! -------------------------------------------------------------------------------- /subprojects/groovy-templates/src/spec/test-resources/raw.txt: -------------------------------------------------------------------------------- 1 | This is raw contents that may include . -------------------------------------------------------------------------------- /xdocs/images/groovy-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/xdocs/images/groovy-logo.png -------------------------------------------------------------------------------- /gradle/verification-keyring.gpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/gradle/verification-keyring.gpg -------------------------------------------------------------------------------- /src/spec/doc/assets/img/a380.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/src/spec/doc/assets/img/a380.jpg -------------------------------------------------------------------------------- /subprojects/groovy-templates/src/spec/test-resources/to_be_escaped.txt: -------------------------------------------------------------------------------- 1 | This is contents that may include . -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /src/spec/doc/assets/img/native.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/src/spec/doc/assets/img/native.jpg -------------------------------------------------------------------------------- /src/spec/doc/assets/img/outdir.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/src/spec/doc/assets/img/outdir.png -------------------------------------------------------------------------------- /src/spec/doc/assets/img/setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/src/spec/doc/assets/img/setup.png -------------------------------------------------------------------------------- /licenses/asm-JARJAR.txt: -------------------------------------------------------------------------------- 1 | ASM License 2 | 3 | ASM uses a 3-clause BSD license. For details, see licenses/asm-license.txt. -------------------------------------------------------------------------------- /src/spec/doc/assets/img/b797-hoax.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/src/spec/doc/assets/img/b797-hoax.jpg -------------------------------------------------------------------------------- /src/spec/doc/assets/img/variables.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/src/spec/doc/assets/img/variables.jpg -------------------------------------------------------------------------------- /src/spec/doc/assets/img/fileassociation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/src/spec/doc/assets/img/fileassociation.png -------------------------------------------------------------------------------- /src/spec/doc/assets/img/usageMessageSpec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/src/spec/doc/assets/img/usageMessageSpec.png -------------------------------------------------------------------------------- /src/spec/doc/assets/img/additionalmodules.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/src/spec/doc/assets/img/additionalmodules.png -------------------------------------------------------------------------------- /licenses/antlr4-JARJAR.txt: -------------------------------------------------------------------------------- 1 | ANTLR 4 License 2 | 3 | Antlr4 is released under a BSD 3-clause license. 4 | See licenses/antlr4-license.txt for details. -------------------------------------------------------------------------------- /notices/javaparser-BINZIP.txt: -------------------------------------------------------------------------------- 1 | This product bundles the JavaParser jar (javaparser.org) 2 | which is available under the terms of the Apache License 2.0 3 | -------------------------------------------------------------------------------- /subprojects/groovy-json/src/test/resources/groovy9802.json: -------------------------------------------------------------------------------- 1 | { 2 | "userId": 1, 3 | "id": 1, 4 | "title": "delectus aut autem", 5 | "completed": false 6 | } -------------------------------------------------------------------------------- /notices/antlr4-JARJAR.txt: -------------------------------------------------------------------------------- 1 | This product includes/uses ANTLR4 (https://github.com/antlr/antlr4) 2 | Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 3 | -------------------------------------------------------------------------------- /subprojects/groovy-jmx/src/spec/doc/assets/img/catalina.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-jmx/src/spec/doc/assets/img/catalina.png -------------------------------------------------------------------------------- /subprojects/groovy-jmx/src/spec/doc/assets/img/jconsole.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-jmx/src/spec/doc/assets/img/jconsole.png -------------------------------------------------------------------------------- /subprojects/groovy-jmx/src/spec/doc/assets/img/oc4jpie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-jmx/src/spec/doc/assets/img/oc4jpie.png -------------------------------------------------------------------------------- /benchmark/bench/objinst.output: -------------------------------------------------------------------------------- 1 | false 2 | true 3 | false 4 | true 5 | false 6 | 7 | true 8 | true 9 | false 10 | false 11 | false 12 | true 13 | true 14 | true 15 | -------------------------------------------------------------------------------- /subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_cd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_cd.png -------------------------------------------------------------------------------- /subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_del.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_del.png -------------------------------------------------------------------------------- /subprojects/groovy-groovysh/src/spec/doc/assets/img/widget1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-groovysh/src/spec/doc/assets/img/widget1.png -------------------------------------------------------------------------------- /subprojects/groovy-groovysh/src/spec/doc/assets/img/widget2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-groovysh/src/spec/doc/assets/img/widget2.png -------------------------------------------------------------------------------- /subprojects/groovy-groovysh/src/spec/doc/assets/img/widget3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-groovysh/src/spec/doc/assets/img/widget3.png -------------------------------------------------------------------------------- /subprojects/groovy-console/src/spec/doc/assets/img/cstbrowser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-console/src/spec/doc/assets/img/cstbrowser.png -------------------------------------------------------------------------------- /subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_alias.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_alias.png -------------------------------------------------------------------------------- /subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_alias2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_alias2.png -------------------------------------------------------------------------------- /subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_colors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_colors.png -------------------------------------------------------------------------------- /subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_echo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_echo.png -------------------------------------------------------------------------------- /subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_grep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_grep.png -------------------------------------------------------------------------------- /subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_import.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_import.png -------------------------------------------------------------------------------- /subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_less.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_less.png -------------------------------------------------------------------------------- /subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_nano.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_nano.png -------------------------------------------------------------------------------- /subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_pipe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_pipe.png -------------------------------------------------------------------------------- /subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_pipe2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_pipe2.png -------------------------------------------------------------------------------- /subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_prnt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_prnt.png -------------------------------------------------------------------------------- /subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_show.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_show.png -------------------------------------------------------------------------------- /subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_slurp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_slurp.png -------------------------------------------------------------------------------- /subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_sort.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_sort.png -------------------------------------------------------------------------------- /subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_ttop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_ttop.png -------------------------------------------------------------------------------- /subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_types.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_types.png -------------------------------------------------------------------------------- /subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_types2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_types2.png -------------------------------------------------------------------------------- /subprojects/groovy-console/src/spec/doc/assets/img/GroovyConsole.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-console/src/spec/doc/assets/img/GroovyConsole.png -------------------------------------------------------------------------------- /subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_colors2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_colors2.png -------------------------------------------------------------------------------- /subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_colors3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_colors3.png -------------------------------------------------------------------------------- /subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_colors4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_colors4.png -------------------------------------------------------------------------------- /subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_console.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_console.png -------------------------------------------------------------------------------- /subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_evaluate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_evaluate.png -------------------------------------------------------------------------------- /subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_history.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_history.png -------------------------------------------------------------------------------- /subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_inspect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_inspect.png -------------------------------------------------------------------------------- /subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_typedef.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_typedef.png -------------------------------------------------------------------------------- /subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_unalias.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_unalias.png -------------------------------------------------------------------------------- /subprojects/groovy-swing/src/spec/doc/assets/img/SwingBuilder001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-swing/src/spec/doc/assets/img/SwingBuilder001.png -------------------------------------------------------------------------------- /subprojects/groovy-console/src/spec/doc/assets/img/astbrowser_source.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-console/src/spec/doc/assets/img/astbrowser_source.png -------------------------------------------------------------------------------- /subprojects/groovy-console/src/spec/doc/assets/img/gconsole-toolbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-console/src/spec/doc/assets/img/gconsole-toolbar.png -------------------------------------------------------------------------------- /subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_classloader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_classloader.png -------------------------------------------------------------------------------- /subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_exceptions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_exceptions.png -------------------------------------------------------------------------------- /subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_inspect_gui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_inspect_gui.png -------------------------------------------------------------------------------- /subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_nano_help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_nano_help.png -------------------------------------------------------------------------------- /subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_slurp_url.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_slurp_url.png -------------------------------------------------------------------------------- /subprojects/groovy-console/src/spec/doc/assets/img/astbrowser_bytecode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-console/src/spec/doc/assets/img/astbrowser_bytecode.png -------------------------------------------------------------------------------- /subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_pipe_builtin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-groovysh/src/spec/doc/assets/img/repl_pipe_builtin.png -------------------------------------------------------------------------------- /benchmark/bench/hello.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * The Computer Language Shootout 3 | * http://shootout.alioth.debian.org/ 4 | * 5 | * contributed by Jochen Hinrichsen 6 | */ 7 | 8 | println 'hello world' 9 | -------------------------------------------------------------------------------- /subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/cut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/cut.png -------------------------------------------------------------------------------- /subprojects/groovy-console/src/spec/doc/assets/img/gconsole-sc-with-visu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-console/src/spec/doc/assets/img/gconsole-sc-with-visu.png -------------------------------------------------------------------------------- /subprojects/groovy-jmx/src/spec/doc/assets/img/jconsole-implicit-export.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-jmx/src/spec/doc/assets/img/jconsole-implicit-export.png -------------------------------------------------------------------------------- /notices/NOTICE-BASE: -------------------------------------------------------------------------------- 1 | Apache Groovy 2 | Copyright 2003-2025 The Apache Software Foundation 3 | 4 | This product includes software developed at 5 | The Apache Software Foundation (http://www.apache.org/). 6 | -------------------------------------------------------------------------------- /subprojects/groovy-console/src/main/resources/groovy/console/ui/ConsoleIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-console/src/main/resources/groovy/console/ui/ConsoleIcon.png -------------------------------------------------------------------------------- /subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/clear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/clear.png -------------------------------------------------------------------------------- /subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/cross.png -------------------------------------------------------------------------------- /subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/disk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/disk.png -------------------------------------------------------------------------------- /subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/find.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/find.png -------------------------------------------------------------------------------- /subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/page.png -------------------------------------------------------------------------------- /subprojects/groovy-console/src/spec/doc/assets/img/gconsole-sc-without-visu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-console/src/spec/doc/assets/img/gconsole-sc-without-visu.png -------------------------------------------------------------------------------- /subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/cup_go.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/cup_go.png -------------------------------------------------------------------------------- /subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/cut_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/cut_red.png -------------------------------------------------------------------------------- /subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/font_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/font_up.png -------------------------------------------------------------------------------- /subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/printer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/printer.png -------------------------------------------------------------------------------- /subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/arrow_redo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/arrow_redo.png -------------------------------------------------------------------------------- /subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/arrow_undo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/arrow_undo.png -------------------------------------------------------------------------------- /subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/book_next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/book_next.png -------------------------------------------------------------------------------- /subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/folder_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/folder_add.png -------------------------------------------------------------------------------- /subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/font_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/font_down.png -------------------------------------------------------------------------------- /subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/page_copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/page_copy.png -------------------------------------------------------------------------------- /subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/page_paste.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/page_paste.png -------------------------------------------------------------------------------- /subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/script_go.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/script_go.png -------------------------------------------------------------------------------- /subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/book_previous.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/book_previous.png -------------------------------------------------------------------------------- /subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/bullet_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/bullet_green.png -------------------------------------------------------------------------------- /subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/folder_page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/folder_page.png -------------------------------------------------------------------------------- /subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/information.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/information.png -------------------------------------------------------------------------------- /subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/package_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/package_add.png -------------------------------------------------------------------------------- /subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/page_refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/page_refresh.png -------------------------------------------------------------------------------- /subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/page_white_go.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/page_white_go.png -------------------------------------------------------------------------------- /subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/text_replace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/text_replace.png -------------------------------------------------------------------------------- /subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/resultset_next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/resultset_next.png -------------------------------------------------------------------------------- /subprojects/groovy-ant/src/test-resources/org/codehaus/groovy/ant/commons-lang3-3.18.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-ant/src/test-resources/org/codehaus/groovy/ant/commons-lang3-3.18.0.jar -------------------------------------------------------------------------------- /subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/page_white_select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/page_white_select.png -------------------------------------------------------------------------------- /subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/page_white_stack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/page_white_stack.png -------------------------------------------------------------------------------- /subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/resultset_previous.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/resultset_previous.png -------------------------------------------------------------------------------- /subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/script_lightning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-console/src/main/resources/groovy/console/ui/icons/script_lightning.png -------------------------------------------------------------------------------- /subprojects/groovy-docgenerator/src/main/resources/org/apache/groovy/docgenerator/groovy.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-docgenerator/src/main/resources/org/apache/groovy/docgenerator/groovy.ico -------------------------------------------------------------------------------- /licenses/hamcrest-BINZIP.txt: -------------------------------------------------------------------------------- 1 | Hamcrest License (needed when using optional JUnit dependency) 2 | 3 | This product bundles the Hamcrest jar, which is available under a 4 | BSD license. For details, see licenses/hamcrest-license.txt. 5 | -------------------------------------------------------------------------------- /licenses/xstream-BINZIP.txt: -------------------------------------------------------------------------------- 1 | XStream License (optional dependency when serializing AST as XML) 2 | 3 | This product bundles the XStream jar, which is available under a 4 | "3-clause BSD" license. For details, see licenses/xstream-license.txt. -------------------------------------------------------------------------------- /licenses/asciidoc-style-SRC-DOC.txt: -------------------------------------------------------------------------------- 1 | Asciidoc License 2 | 3 | This product uses the style.css from asciidoctor.org within 4 | documentation. The file is available under the MIT License. 5 | For details, see licenses/asciidoc-style-license.txt. 6 | -------------------------------------------------------------------------------- /notices/silkicons-BINZIP-SRC.txt: -------------------------------------------------------------------------------- 1 | This product bundles icons from the famfamfam.com silk icons set 2 | http://www.famfamfam.com/lab/icons/silk/ 3 | Licensed under the Creative Commons Attribution Licence v2.5 4 | http://creativecommons.org/licenses/by/2.5/ -------------------------------------------------------------------------------- /licenses/jquery-js-DOC-SRC.txt: -------------------------------------------------------------------------------- 1 | JQuery License 2 | 3 | The following file is used within documentation: 4 | 5 | src/spec/assets/css/jquery-2.1.1.min.js 6 | 7 | This file is made available under the following MIT license: 8 | licenses/jquery-js-license.txt -------------------------------------------------------------------------------- /benchmark/bench/hello.java: -------------------------------------------------------------------------------- 1 | // $Id: hello.java,v 1.3 2007-06-20 03:32:39 bfulgham Exp $ 2 | // http://shootout.alioth.debian.org/ 3 | 4 | public class hello { 5 | public static void main(String args[]) { 6 | System.out.print("hello world\n"); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /notices/concurrentreferencehashmap-SRC.txt: -------------------------------------------------------------------------------- 1 | The Java source file src/main/java/org/apache/groovy/util/concurrent/ConcurrentReferenceHashMap 2 | is from https://github.com/hazelcast/hazelcast and the following notice applies: 3 | Copyright (c) 2008-2020, Hazelcast, Inc. All Rights Reserved. 4 | -------------------------------------------------------------------------------- /subprojects/groovy-groovydoc/src/main/resources/org/codehaus/groovy/tools/groovydoc/gstringTemplates/topLevel/inherit.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/groovy/HEAD/subprojects/groovy-groovydoc/src/main/resources/org/codehaus/groovy/tools/groovydoc/gstringTemplates/topLevel/inherit.gif -------------------------------------------------------------------------------- /notices/concurrentlinkedhashmap-SRC.txt: -------------------------------------------------------------------------------- 1 | The Java source files in src/main/java/org/apache/groovy/util/concurrent/concurrentlinkedhashmap/ 2 | are from https://github.com/ben-manes/concurrentlinkedhashmap and the following notice applies: 3 | Copyright 2010-2012 Google Inc. All Rights Reserved. 4 | -------------------------------------------------------------------------------- /notices/junit-BINZIP.txt: -------------------------------------------------------------------------------- 1 | This product bundles the JUnit4 jar (junit.org) 2 | which is available under the terms of the Eclipse Public License v1.0 3 | 4 | This product bundles several of the JUnit5 jars (junit.org) 5 | which are available under the terms of the Eclipse Public License v2.0 6 | -------------------------------------------------------------------------------- /benchmark/bench/moments.output: -------------------------------------------------------------------------------- 1 | n: 500 2 | median: 250.500000 3 | mean: 250.500000 4 | average_deviation: 125.000000 5 | standard_deviation: 144.481833 6 | variance: 20875.000000 7 | skew: 0.000000 8 | kurtosis: -1.207202 9 | -------------------------------------------------------------------------------- /benchmark/bench/fibo.groovy: -------------------------------------------------------------------------------- 1 | // $Id: fibo.java,v 1.3 2005-04-25 19:01:38 igouy-guest Exp $ 2 | // http://www.bagley.org/~doug/shootout/ 3 | 4 | int N = args[0] as int 5 | println fib(N) 6 | 7 | int fib(int n) { 8 | if (n < 2) return 1 9 | return fib(n - 2) + fib(n - 1) 10 | } 11 | 12 | -------------------------------------------------------------------------------- /licenses/jsr166y-BINZIP.txt: -------------------------------------------------------------------------------- 1 | JSR166y License (optionally used by the optional GPars dependency) 2 | 3 | This product bundles the jsr166y jar (containing works from 4 | the JSR-166 EG, Doug Lea, and Jason T. Greene) made available in 5 | the public domain. For details, see licenses/jsr166y-license.txt. 6 | -------------------------------------------------------------------------------- /licenses/normalize-stylesheet-BINZIP-DOC-SRC.txt: -------------------------------------------------------------------------------- 1 | normalize.css License 2 | 3 | The stylesheet.css file (originally normalize.css) is used by the 4 | groovydoc and docgenerator components for groovy-jdk/gapi documentation. 5 | It is made available under a MIT License: 6 | licenses/normalize-stylesheet-license.txt -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /notices/NOTICE-JARJAR: -------------------------------------------------------------------------------- 1 | Apache Groovy 2 | Copyright 2003-2025 The Apache Software Foundation 3 | 4 | This product includes software developed at 5 | The Apache Software Foundation (http://www.apache.org/). 6 | 7 | This product includes/uses ANTLR4 (https://github.com/antlr/antlr4) 8 | Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | user.gradle 2 | build.bat 3 | .gradle/ 4 | target/ 5 | build/ 6 | bin/ 7 | out/ 8 | 9 | *.DS_Store 10 | *.class 11 | *.dat 12 | *.swp 13 | *~ 14 | 15 | .idea 16 | *.iml 17 | *.ipr 18 | *.iws 19 | 20 | .settings/ 21 | .classpath 22 | .project 23 | 24 | .fleet 25 | .shelf 26 | .vscode 27 | .jqwik-database 28 | verification-metadata.dryrun.xml 29 | -------------------------------------------------------------------------------- /licenses/junit-BINZIP.txt: -------------------------------------------------------------------------------- 1 | JUnit Licenses (optional dependencies when using Groovy for testing) 2 | 3 | This product bundles the JUnit 4 jar, which is available under the 4 | Eclipse Public License v1.0. For details, see licenses/junit4-license.txt. 5 | 6 | This product bundles several JUnit 5 jars, which are available under the 7 | Eclipse Public License v2.0. For details, see licenses/junit5-license.txt. 8 | -------------------------------------------------------------------------------- /benchmark/bench/ackermann.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * The Computer Language Shootout 3 | * http://shootout.alioth.debian.org/ 4 | * 5 | * contributed by Jochen Hinrichsen 6 | */ 7 | 8 | def A(x, y) { 9 | if (x == 0) return y+1 10 | if (y == 0) return A(x-1, 1) 11 | return A(x-1, A(x, y-1)) 12 | } 13 | 14 | def n = args[0].toInteger() 15 | def result = A(3, n) 16 | println("Ack(3,${n}): ${result}") 17 | -------------------------------------------------------------------------------- /benchmark/bench/fibo.java: -------------------------------------------------------------------------------- 1 | // $Id: fibo.java,v 1.3 2005-04-25 19:01:38 igouy-guest Exp $ 2 | // http://www.bagley.org/~doug/shootout/ 3 | 4 | public class fibo { 5 | public static void main(String args[]) { 6 | int N = Integer.parseInt(args[0]); 7 | System.out.println(fib(N)); 8 | } 9 | public static int fib(int n) { 10 | if (n < 2) return(1); 11 | return( fib(n-2) + fib(n-1) ); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /subprojects/groovy-console/NOTICE: -------------------------------------------------------------------------------- 1 | Apache Groovy 2 | Copyright 2003-2025 The Apache Software Foundation 3 | 4 | This product includes software developed at 5 | The Apache Software Foundation (http://www.apache.org/). 6 | 7 | This product bundles icons from the famfamfam.com silk icons set 8 | http://www.famfamfam.com/lab/icons/silk/ 9 | Licensed under the Creative Commons Attribution Licence v2.5 10 | http://creativecommons.org/licenses/by/2.5/ -------------------------------------------------------------------------------- /.asf.yaml: -------------------------------------------------------------------------------- 1 | # see https://s.apache.org/asfyaml 2 | github: 3 | description: "Apache Groovy: A powerful multi-faceted programming language for the JVM platform" 4 | homepage: https://groovy-lang.org 5 | labels: 6 | - groovy 7 | - jvm-languages 8 | - programming-language 9 | - metaprogramming 10 | - functional-programming 11 | - dynamic-typing 12 | - static-typing 13 | - compiler 14 | - apache 15 | 16 | notifications: 17 | jira_options: link label comment 18 | -------------------------------------------------------------------------------- /licenses/jsr223-BINZIP-SRC.txt: -------------------------------------------------------------------------------- 1 | JSR223 License 2 | 3 | The following classes within this product: 4 | 5 | org.codehaus.groovy.jsr223.GroovyCompiledScript 6 | org.codehaus.groovy.jsr223.GroovyScriptEngineFactory 7 | org.codehaus.groovy.jsr223.GroovyScriptEngineImpl 8 | 9 | were derived from reference implementation files developed by Sun in 10 | collaboration with the Groovy community. The reference implementation 11 | has a BSD-style license. Details can be found in: licenses/jsr223-license.txt 12 | -------------------------------------------------------------------------------- /benchmark/bench/ackermann.java: -------------------------------------------------------------------------------- 1 | // $Id: ackermann.java,v 1.2 2005-05-13 16:24:17 igouy-guest Exp $ 2 | // http://www.bagley.org/~doug/shootout/ 3 | 4 | public class ackermann { 5 | public static void main(String[] args) { 6 | int num = Integer.parseInt(args[0]); 7 | System.out.println("Ack(3," + num + "): " + Ack(3, num)); 8 | } 9 | public static int Ack(int m, int n) { 10 | return (m == 0) ? (n + 1) : ((n == 0) ? Ack(m-1, 1) : 11 | Ack(m-1, Ack(m, n - 1))); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /benchmark/bench/takfp.java: -------------------------------------------------------------------------------- 1 | /* The Great Computer Language Shootout 2 | http://shootout.alioth.debian.org/ 3 | 4 | contributed by Isaac Gouy 5 | */ 6 | 7 | 8 | public class takfp { 9 | public static void main(String args[]) { 10 | int n = Integer.parseInt(args[0]); 11 | System.out.println( Tak(n*3.0f, n*2.0f, n*1.0f) ); 12 | } 13 | 14 | public static float Tak (float x, float y, float z) { 15 | if (y >= x) return z; 16 | return Tak(Tak(x-1.0f,y,z), Tak(y-1.0f,z,x), Tak(z-1.0f,x,y)); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /licenses/readme.txt: -------------------------------------------------------------------------------- 1 | This directory contains generated LICENSE files and snippets used to generate those files. 2 | See the assemble.gradle file (updateLicenses task) for details on how this is done. 3 | Snippets have predefined suffix values in their name to determine which files they go into. 4 | LICENSE (the one for source), LICENSE-DOC and LICENSE-JARJAR 5 | get snippets containing SRC, DOC and JARJAR respectively. 6 | LICENSE-BINZIP gets JARJAR and BINZIP snippets. 7 | In addition, LICENSE files are generated for these subprojects: 8 | groovy-docgenerator, groovy-groovydoc, groovy-groovysh, groovy-jsr223 -------------------------------------------------------------------------------- /notices/readme.txt: -------------------------------------------------------------------------------- 1 | This directory contains generated NOTICE files and snippets used to generate those files. 2 | See the assemble.gradle file (updateNotices task) for details on how this is done. 3 | Snippets have predefined suffix values in their name to determine which files they go into. 4 | NOTICE (the one for source), NOTICE-DOC, NOTICE-GROOID and NOTICE-JARJAR 5 | get snippets containing SRC, DOC, GROOID and JARJAR respectively. 6 | NOTICE-GROOIDJARJAR gets JARJAR and GROOID snippets. 7 | NOTICE-BINZIP gets GROOID, JARJAR and BINZIP snippets. 8 | In addition, NOTICE files are generated for these subprojects: 9 | groovy-console -------------------------------------------------------------------------------- /notices/openbeans-GROOID.txt: -------------------------------------------------------------------------------- 1 | This product embeds the OpenBeans jar within its grooid jar artifacts 2 | OpenBeans includes/uses files from Apache Harmony and the following notice applies 3 | Copyright 2006, 2010 The Apache Software Foundation. 4 | Portions of Apache Harmony were originally developed by Intel Corporation and are 5 | licensed to the Apache Software Foundation under the "Software Grant and Corporate 6 | Contribution License Agreement" and for which the following copyright notices apply 7 | (C) Copyright 2005 Intel Corporation 8 | (C) Copyright 2005-2006 Intel Corporation 9 | (C) Copyright 2006 Intel Corporation 10 | -------------------------------------------------------------------------------- /benchmark/bench/random.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * The Computer Language Shootout 3 | * http://shootout.alioth.debian.org/ 4 | * 5 | * contributed by Jochen Hinrichsen 6 | */ 7 | 8 | def IM = 139968 9 | def IA = 3877 10 | def IC = 29573 11 | def last = 42D 12 | 13 | def gen_random(Double max) { 14 | last = (last * IA + IC) % IM 15 | max * last / IM 16 | } 17 | 18 | def n = (args.length == 0 ? 1 : args[0].toInteger()) - 1 19 | while (n--) { 20 | gen_random(100D) 21 | } 22 | 23 | def nf = java.text.NumberFormat.getInstance() 24 | nf.setMaximumFractionDigits(9) 25 | nf.setMinimumFractionDigits(9) 26 | nf.setGroupingUsed(false) 27 | println nf.format(gen_random(100D)) 28 | -------------------------------------------------------------------------------- /benchmark/bench/harmonic.java: -------------------------------------------------------------------------------- 1 | /* The Great Computer Language Shootout 2 | http://shootout.alioth.debian.org/ 3 | 4 | contributed by Paul Lofte 5 | */ 6 | 7 | import java.text.DecimalFormat; 8 | import java.text.NumberFormat; 9 | 10 | public class harmonic { 11 | 12 | static final NumberFormat formatter = new DecimalFormat("#.000000000"); 13 | 14 | public static void main(String[] args) { 15 | int n = 10000000; 16 | if (args.length > 0) n = Integer.parseInt(args[0]); 17 | 18 | double partialSum = 0.0; 19 | for (int i=1; i<=n; i++) partialSum += 1.0/i; 20 | 21 | System.out.println(formatter.format(partialSum)); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /benchmark/bench/nestedloop.java: -------------------------------------------------------------------------------- 1 | // $Id: nestedloop.java,v 1.1 2004-05-23 07:14:28 bfulgham Exp $ 2 | // http://www.bagley.org/~doug/shootout/ 3 | 4 | import java.io.*; 5 | import java.util.*; 6 | 7 | public class nestedloop { 8 | public static void main(String args[]) throws IOException { 9 | int n = Integer.parseInt(args[0]); 10 | int x = 0; 11 | for (int a=0; a 12 | // split on words 13 | line.split("\\W").each() { word -> 14 | def s = word.toLowerCase() 15 | def entry = dict[s] 16 | dict[s] = (entry == null) ? 1 : entry + 1 17 | } 18 | } 19 | 20 | // default sort() is smallest first 21 | // sort for multiple properties: [ it.value, it.key ] 22 | assert dict != null 23 | assert dict.values() != null 24 | assert (dict.values().sort({ l, r -> r <=> l })) != null 25 | dict.values().sort({ l, r -> r <=> l }).each() { value -> 26 | println "${value.toString().padLeft(8)}" 27 | } 28 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | 16 | 17 | # Contributing 18 | 19 | Please visit the 20 | [project development website](https://groovy.apache.org/) 21 | to find out more about contributing to the project. 22 | We welcome all contributors. 23 | -------------------------------------------------------------------------------- /benchmark/bench/ary.groovy: -------------------------------------------------------------------------------- 1 | // $Id: ary.java,v 1.1 2004-05-22 07:27:00 bfulgham Exp $ 2 | // http://www.bagley.org/~doug/shootout/ 3 | 4 | // this program is modified from: 5 | // http://cm.bell-labs.com/cm/cs/who/bwk/interps/pap.html 6 | // Timing Trials, or, the Trials of Timing: Experiments with Scripting 7 | // and User-Interface Languages by Brian W. Kernighan and 8 | // Christopher J. Van Wyk. 9 | 10 | 11 | public class ary { 12 | public static void main(String[] args) { 13 | int i, j, k, n = Integer.parseInt(args[0]); 14 | int[] x = new int[n]; 15 | int[] y = new int[n]; 16 | 17 | for (i = 0; i < n; i++) 18 | x[i] = i + 1; 19 | for (k = 0; k < 1000; k++ ) 20 | for (j = n-1; j >= 0; j--) 21 | y[j] += x[j]; 22 | 23 | System.out.println(y[0] + " " + y[n-1]); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /.muse/config.toml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | jdk11 = true 17 | customTools = [".muse/codenarc.sh"] 18 | -------------------------------------------------------------------------------- /benchmark/bench/ary.java: -------------------------------------------------------------------------------- 1 | // $Id: ary.java,v 1.1 2004-05-22 07:27:00 bfulgham Exp $ 2 | // http://www.bagley.org/~doug/shootout/ 3 | 4 | // this program is modified from: 5 | // http://cm.bell-labs.com/cm/cs/who/bwk/interps/pap.html 6 | // Timing Trials, or, the Trials of Timing: Experiments with Scripting 7 | // and User-Interface Languages by Brian W. Kernighan and 8 | // Christopher J. Van Wyk. 9 | 10 | import java.io.*; 11 | import java.util.*; 12 | 13 | public class ary { 14 | public static void main(String args[]) { 15 | int i, j, k, n = Integer.parseInt(args[0]); 16 | int x[] = new int[n]; 17 | int y[] = new int[n]; 18 | 19 | for (i = 0; i < n; i++) 20 | x[i] = i + 1; 21 | for (k = 0; k < 1000; k++ ) 22 | for (j = n-1; j >= 0; j--) 23 | y[j] += x[j]; 24 | 25 | System.out.println(y[0] + " " + y[n-1]); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/test/groovy/groovy/util/i18n_en.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | yes=yes -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Apache Groovy 2 | Copyright 2003-2025 The Apache Software Foundation 3 | 4 | This product includes software developed at 5 | The Apache Software Foundation (http://www.apache.org/). 6 | 7 | The Java source files in src/main/java/org/apache/groovy/util/concurrent/concurrentlinkedhashmap/ 8 | are from https://github.com/ben-manes/concurrentlinkedhashmap and the following notice applies: 9 | Copyright 2010-2012 Google Inc. All Rights Reserved. 10 | 11 | The Java source file src/main/java/org/apache/groovy/util/concurrent/ConcurrentReferenceHashMap 12 | is from https://github.com/hazelcast/hazelcast and the following notice applies: 13 | Copyright (c) 2008-2020, Hazelcast, Inc. All Rights Reserved. 14 | 15 | This product bundles icons from the famfamfam.com silk icons set 16 | http://www.famfamfam.com/lab/icons/silk/ 17 | Licensed under the Creative Commons Attribution Licence v2.5 18 | http://creativecommons.org/licenses/by/2.5/ -------------------------------------------------------------------------------- /src/test-resources/fail/Break_01x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | break -------------------------------------------------------------------------------- /src/test-resources/fail/List_01.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | [,] -------------------------------------------------------------------------------- /src/test/groovy/groovy/util/i18n.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | upvote=+1 21 | -------------------------------------------------------------------------------- /jitpack.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | jdk: oraclejdk9 17 | 18 | install: 19 | - ./gradlew install -x test -x asciidoctor 20 | -------------------------------------------------------------------------------- /src/test-resources/fail/Expression_01.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | int() -------------------------------------------------------------------------------- /src/test-resources/fail/Expression_02.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 1 = 2 -------------------------------------------------------------------------------- /src/test/groovy/groovy/util/i18n_fr.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | yes=oui 21 | -------------------------------------------------------------------------------- /subprojects/groovy-groovysh/src/main/resources/nanorc/jlessrc: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | theme dark.nanorctheme 16 | include *.nanorc 17 | -------------------------------------------------------------------------------- /subprojects/groovy-groovysh/src/main/resources/nanorc/jnanorc: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | theme dark.nanorctheme 16 | include *.nanorc 17 | -------------------------------------------------------------------------------- /src/test-resources/core/Closure_01.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | {->} 20 | -------------------------------------------------------------------------------- /src/test-resources/core/Closure_02.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | {->12} 20 | -------------------------------------------------------------------------------- /src/test-resources/core/GString_04.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | "At $date" -------------------------------------------------------------------------------- /src/test-resources/core/GString_05.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | """At $date""" -------------------------------------------------------------------------------- /src/test-resources/fail/Continue_01x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | continue; -------------------------------------------------------------------------------- /src/test-resources/fail/Expression_03.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | m() = 2 -------------------------------------------------------------------------------- /src/test-resources/fail/Expression_04.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | this = 2 -------------------------------------------------------------------------------- /src/test-resources/fail/Expression_05.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | super = 2 -------------------------------------------------------------------------------- /src/test-resources/fail/Expression_06.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | [1, 2] = 2 -------------------------------------------------------------------------------- /src/test-resources/fail/Expression_08.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | "$x" = 2 -------------------------------------------------------------------------------- /src/test-resources/fail/Expression_09.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 'x' = 2 -------------------------------------------------------------------------------- /src/test-resources/fail/MethodCall_01x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | m(,) -------------------------------------------------------------------------------- /src/test-resources/fail/Number_03x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 10101_ 20 | -------------------------------------------------------------------------------- /src/test-resources/fail/Number_04x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 10101_.0 20 | -------------------------------------------------------------------------------- /src/test-resources/fail/Number_05x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 10101.0_ 20 | -------------------------------------------------------------------------------- /src/test-resources/fail/ParExpression_01x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | (1 + 2 -------------------------------------------------------------------------------- /src/test-resources/fail/ParExpression_03x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | (1 + 2] -------------------------------------------------------------------------------- /src/test-resources/fail/UnexpectedCharacter_01x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 |  -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | 16 | 17 | # Community Conduct 18 | 19 | We try to keep the Groovy community a friendly and welcoming place, 20 | by keeping discussions respectful and following the 21 | [Apache Software Foundation Code of Conduct](https://www.apache.org/foundation/policies/conduct.html) when interacting with others. 22 | -------------------------------------------------------------------------------- /benchmark/bench/sieve.java: -------------------------------------------------------------------------------- 1 | // $Id: sieve.java,v 1.1 2004-05-23 07:14:28 bfulgham Exp $ 2 | // http://www.bagley.org/~doug/shootout/ 3 | 4 | public class sieve { 5 | public static void main(String args[]) { 6 | int NUM = Integer.parseInt(args[0]); 7 | boolean [] flags = new boolean[8192 + 1]; 8 | int count = 0; 9 | while (NUM-- > 0) { 10 | count = 0; 11 | for (int i=2; i <= 8192; i++) { 12 | flags[i] = true; 13 | } 14 | for (int i=2; i <= 8192; i++) { 15 | if (flags[i]) { 16 | // remove all multiples of prime: i 17 | for (int k=i+i; k <= 8192; k+=i) { 18 | flags[k] = false; 19 | } 20 | count++; 21 | } 22 | } 23 | } 24 | System.out.print("Count: " + count + "\n"); 25 | } 26 | } 27 | 28 | -------------------------------------------------------------------------------- /src/test-resources/bugs/BUG-GROOVY-8216.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | ​println 09​ -------------------------------------------------------------------------------- /src/test-resources/bugs/BUG-GROOVY-9427.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | "${String s}" -------------------------------------------------------------------------------- /src/test-resources/core/Closure_03.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | {-> {->12}} 20 | -------------------------------------------------------------------------------- /src/test-resources/core/GString_06.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | /At $date/ -------------------------------------------------------------------------------- /src/test-resources/core/Throw_01.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | throw e; 20 | throw e -------------------------------------------------------------------------------- /src/test-resources/fail/AbstractMethod_04x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | def w() -------------------------------------------------------------------------------- /src/test-resources/fail/Expression_07.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | [a: 1, b: 2] = 2 -------------------------------------------------------------------------------- /src/test-resources/fail/Modifier_01x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | def def m() {} -------------------------------------------------------------------------------- /src/test-resources/fail/Modifier_07.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | volatile x() {} -------------------------------------------------------------------------------- /src/test-resources/fail/Number_01x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 2147483648I 20 | -------------------------------------------------------------------------------- /src/test-resources/fail/ParExpression_02x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | (1 + 2)) -------------------------------------------------------------------------------- /src/test-resources/fail/Parentheses_01.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | def a( { 20 | } -------------------------------------------------------------------------------- /licenses/jline3-BINZIP-SRC.txt: -------------------------------------------------------------------------------- 1 | JLine3 License 2 | 3 | The following source files within this product: 4 | 5 | org/apache/groovy/groovysh/jline/GroovyEngine.java 6 | org/apache/groovy/groovysh/jline/ObjectInspector.groovy 7 | org/apache/groovy/groovysh/jline/Utils.groovy 8 | org/apache/groovy/groovysh/jline/JrtJavaBasePackages.java 9 | org/apache/groovy/groovysh/jline/PackageHelper.java 10 | 11 | were derived from similarly named files in the JLine3 source repository which 12 | have a BSD-style license. 13 | 14 | Some parts of the source code from: 15 | 16 | org/apache/groovy/groovysh/jline/GroovyPosixCommands.java 17 | 18 | were derived from the JLine3 PosixCommands class. 19 | 20 | Details can be found in: licenses/jline3-license.txt 21 | 22 | This product bundles several JLine3 jars (optional dependency used with groovysh), 23 | which are available under a BSD License. For details, see licenses/jline3-license.txt. 24 | -------------------------------------------------------------------------------- /src/test-resources/fail/AbstractMethod_05x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | abstract v() -------------------------------------------------------------------------------- /src/test-resources/fail/AbstractMethod_06x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | abstract u() {} -------------------------------------------------------------------------------- /src/test-resources/fail/For_01.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | for (*a; a.size() < 10;) {} -------------------------------------------------------------------------------- /src/test-resources/fail/For_02.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | for (; a.size() < 10; *a) {} -------------------------------------------------------------------------------- /src/test-resources/fail/Modifier_03x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | final final int a = 1; -------------------------------------------------------------------------------- /src/test-resources/fail/Var_01x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | class var {} 21 | -------------------------------------------------------------------------------- /src/test-resources/core/Annotation_01.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | @Export package core 20 | -------------------------------------------------------------------------------- /src/test-resources/core/Closure_04.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | {-> 20 | 12 21 | } 22 | -------------------------------------------------------------------------------- /src/test-resources/core/ImportDeclaration_05.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | import java.util.* -------------------------------------------------------------------------------- /src/test-resources/fail/Array_02x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | def foo = new double[] 20 | -------------------------------------------------------------------------------- /src/test-resources/fail/ClosureListExpression_02.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | def x = (1;2;3) -------------------------------------------------------------------------------- /src/test-resources/fail/ClosureListExpression_03.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | [].bar(1;2;3) -------------------------------------------------------------------------------- /src/test-resources/fail/MethodDeclaration_05x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | foo(int a) 20 | -------------------------------------------------------------------------------- /src/test-resources/fail/Modifier_02x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | public public class A {} -------------------------------------------------------------------------------- /src/test-resources/fail/Number_02x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 9223372036854775808L 20 | -------------------------------------------------------------------------------- /src/test-resources/fail/String_01x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | def v = '''123'''''' -------------------------------------------------------------------------------- /src/test-resources/fail/String_02x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | def v2 = """123"""""" -------------------------------------------------------------------------------- /src/test-resources/fail/UnaryOperator_01x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | +'bar2' 21 | -------------------------------------------------------------------------------- /src/test-resources/fail/UnaryOperator_02x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | -'bar2' 21 | -------------------------------------------------------------------------------- /src/test-resources/fail/Var_02x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | var someMethod() {} 21 | -------------------------------------------------------------------------------- /src/test-resources/bugs/BUG-GROOVY-8161.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | for (foo in []) {; 20 | } -------------------------------------------------------------------------------- /src/test-resources/core/Annotation_02.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | @Export 20 | package core 21 | -------------------------------------------------------------------------------- /src/test-resources/core/Closure_05.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | {int a -> 20 | a 21 | } 22 | -------------------------------------------------------------------------------- /src/test-resources/core/Closure_07.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | {Object... i -> 20 | i 21 | } -------------------------------------------------------------------------------- /src/test-resources/core/ImportDeclaration_01.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | import java.util.Map -------------------------------------------------------------------------------- /src/test-resources/core/ImportDeclaration_02.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | import java.util.Map; -------------------------------------------------------------------------------- /src/test-resources/fail/Array_01x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | def foo = new double[][5] 20 | -------------------------------------------------------------------------------- /src/test-resources/fail/Array_03x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | def foo = new double[2][][5] 20 | -------------------------------------------------------------------------------- /src/test-resources/fail/Assert_01x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | def a = 1 20 | assert a = 2 21 | -------------------------------------------------------------------------------- /src/test-resources/fail/Break_02x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | if (true) { 20 | break; 21 | } -------------------------------------------------------------------------------- /src/test-resources/fail/MethodDeclaration_04x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | foo(String a) 20 | -------------------------------------------------------------------------------- /src/test-resources/fail/String_03.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | def a = 'a 21 | ' -------------------------------------------------------------------------------- /src/test-resources/fail/String_04.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | def a = "a 21 | " -------------------------------------------------------------------------------- /src/test-resources/core/Annotation_05.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | @Test1 import java.util.Map 20 | -------------------------------------------------------------------------------- /src/test-resources/core/PackageDeclaration_01.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package com.groovyhelp.core -------------------------------------------------------------------------------- /src/test-resources/core/PackageDeclaration_03.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package com.groovyhelp.core; -------------------------------------------------------------------------------- /src/test-resources/core/PackageDeclaration_06.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package def.in.as.trait; -------------------------------------------------------------------------------- /src/test-resources/fail/Continue_02x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | if (true) { 20 | continue; 21 | } -------------------------------------------------------------------------------- /src/test-resources/fail/ThreadSafe_01x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | threadsafe foo() {} 21 | -------------------------------------------------------------------------------- /notices/NOTICE-GROOIDJARJAR: -------------------------------------------------------------------------------- 1 | Apache Groovy 2 | Copyright 2003-2025 The Apache Software Foundation 3 | 4 | This product includes software developed at 5 | The Apache Software Foundation (http://www.apache.org/). 6 | 7 | This product includes/uses ANTLR4 (https://github.com/antlr/antlr4) 8 | Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 9 | 10 | This product embeds the OpenBeans jar within its grooid jar artifacts 11 | OpenBeans includes/uses files from Apache Harmony and the following notice applies 12 | Copyright 2006, 2010 The Apache Software Foundation. 13 | Portions of Apache Harmony were originally developed by Intel Corporation and are 14 | licensed to the Apache Software Foundation under the "Software Grant and Corporate 15 | Contribution License Agreement" and for which the following copyright notices apply 16 | (C) Copyright 2005 Intel Corporation 17 | (C) Copyright 2005-2006 Intel Corporation 18 | (C) Copyright 2006 Intel Corporation -------------------------------------------------------------------------------- /src/test-resources/bugs/BUG-GROOVY-8150.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | def a 20 | def b = [1] 21 | ((a)) = b -------------------------------------------------------------------------------- /src/test-resources/core/Annotation_04.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | @Export @Version 20 | package core 21 | -------------------------------------------------------------------------------- /src/test-resources/core/Annotation_06.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | @Test1 20 | import java.util.Map 21 | -------------------------------------------------------------------------------- /src/test-resources/core/PackageDeclaration_02.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package com.groovyhelp.core 20 | -------------------------------------------------------------------------------- /src/test-resources/fail/AbstractMethod_01x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | class A { 20 | def x() 21 | } -------------------------------------------------------------------------------- /src/test-resources/fail/AbstractMethod_03x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | trait B { 20 | def z() 21 | } -------------------------------------------------------------------------------- /src/test-resources/fail/Array_04x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | def foo = new double[2] { 1.0, 2.0 } 20 | -------------------------------------------------------------------------------- /src/test-resources/fail/Modifier_04x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | class A { 20 | private public a 21 | } -------------------------------------------------------------------------------- /src/test-resources/fail/SwitchExpression_10x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | println switch (10) {} 21 | -------------------------------------------------------------------------------- /src/test/groovy/groovy/util/system.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | catalog.prov = false 21 | catalog.prov.db.user = sa -------------------------------------------------------------------------------- /subprojects/groovy-templates/src/spec/test-resources/main.tpl: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | p 'test template' -------------------------------------------------------------------------------- /src/test-resources/META-INF/services/java.lang.System$LoggerFinder: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | groovy.util.logging.vm9.LoggerSpyFinder -------------------------------------------------------------------------------- /src/test-resources/bugs/BUG-GROOVY-9433.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | true ? ["abc"] as String[] : new String[0] -------------------------------------------------------------------------------- /src/test-resources/core/Annotation_03.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | @Export 20 | @Version 21 | package core 22 | -------------------------------------------------------------------------------- /src/test-resources/core/Annotation_07.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | @Test1 @Test2 20 | import java.util.Map 21 | -------------------------------------------------------------------------------- /src/test-resources/core/Expression_20.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | @Test2(pre={ super(xx);}) 20 | class XX {} -------------------------------------------------------------------------------- /src/test-resources/fail/ClosureListExpression_01.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | [].for(1;2;3){println "in loop"} -------------------------------------------------------------------------------- /src/test-resources/fail/ConstructorDeclaration_01.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | class Foo { static final Foo() {}} -------------------------------------------------------------------------------- /src/test-resources/fail/Import_01x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | { 21 | import java.util.* 22 | } 23 | -------------------------------------------------------------------------------- /src/test-resources/fail/LocalVariableDeclaration_01.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | @Test2 (int c, int d) = [1, 2] -------------------------------------------------------------------------------- /src/test-resources/fail/Modifier_05x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | class A { 20 | protected public a 21 | } -------------------------------------------------------------------------------- /src/test-resources/fail/Void_01x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | class MyClass { 20 | void field 21 | } 22 | -------------------------------------------------------------------------------- /src/test-resources/fail/AbstractMethod_02x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | enum E { 20 | A, B 21 | def y() 22 | } -------------------------------------------------------------------------------- /src/test/groovy/groovy/script/scriptHelloWorld.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | println "Hello world" 20 | 21 | 22 | -------------------------------------------------------------------------------- /subprojects/groovy-templates/src/test/resources/includes/hello_fr_FR.tpl: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | yield 'Bonjour!' -------------------------------------------------------------------------------- /src/test-resources/fail/DoWhile_01x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | do 20 | println 123 21 | println 123 22 | while(false) -------------------------------------------------------------------------------- /src/test-resources/fail/Import_02x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | def m() { 21 | import java.util.* 22 | } 23 | -------------------------------------------------------------------------------- /src/test-resources/fail/RecordDeclaration_03x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package core 20 | 21 | record Fruit {} 22 | -------------------------------------------------------------------------------- /src/test-resources/fail/SealedTypeDeclaration_04x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | non-sealed enum ShapeI { } 21 | 22 | -------------------------------------------------------------------------------- /subprojects/groovy-jsr223/src/main/resources/META-INF/services/javax.script.ScriptEngineFactory: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | org.codehaus.groovy.jsr223.GroovyScriptEngineFactory 17 | -------------------------------------------------------------------------------- /subprojects/groovy-templates/src/spec/test-resources/locale_include.tpl: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | yield 'Default text' -------------------------------------------------------------------------------- /subprojects/groovy-templates/src/test/resources/includes/hello.tpl: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | yield 'Hello from include!' -------------------------------------------------------------------------------- /src/spec/doc/assets/css/view-example.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2003-2014 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | .listingblock a.view-result { 18 | float: right; 19 | font-weight: normal; 20 | text-decoration: none; 21 | font-size: 0.9em; 22 | line-height: 1.4; 23 | margin-top: 0.15em; 24 | } 25 | 26 | .exampleblock.result { 27 | display: none; 28 | } 29 | -------------------------------------------------------------------------------- /src/test-resources/fail/MethodDeclaration_02x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | def c = {a, a -> println a} 21 | c(1, 2) 22 | -------------------------------------------------------------------------------- /src/test-resources/fail/MethodDeclaration_03x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | def c(a, a) { println a} 21 | c(1, 2) 22 | -------------------------------------------------------------------------------- /src/test-resources/fail/SealedTypeDeclaration_05x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | sealed interface ShapeI { } 21 | 22 | -------------------------------------------------------------------------------- /src/test/groovy/bugs/Groovy4393BugV1.foogroovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package groovy.bugs 20 | 21 | class Groovy4393BugV1 { } -------------------------------------------------------------------------------- /src/test/groovy/groovy/annotations/package-info.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | @MyIntegerAnno(30) 20 | package groovy.annotations -------------------------------------------------------------------------------- /src/test/groovy/groovy/script/scriptMethodReflection.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | GString.methods.each { println it.name } 20 | -------------------------------------------------------------------------------- /config/checkstyle/codeHeader.txt: -------------------------------------------------------------------------------- 1 | ^/\*$ 2 | ^ \* ? Licensed to the Apache Software Foundation \(ASF\) under one$ 3 | ^ \* ? or more contributor license agreements\. See the NOTICE file$ 4 | ^ \* ? distributed with this work for additional information$ 5 | ^ \* ? regarding copyright ownership\. The ASF licenses this file$ 6 | ^ \* ? to you under the Apache License, Version 2\.0 \(the$ 7 | ^ \* ? "License"\); you may not use this file except in compliance$ 8 | ^ \* ? with the License\. You may obtain a copy of the License at$ 9 | ^ \*$ 10 | ^ \* ? http://www\.apache\.org/licenses/LICENSE-2\.0$ 11 | ^ \*$ 12 | ^ \* ? Unless required by applicable law or agreed to in writing,$ 13 | ^ \* ? software distributed under the License is distributed on an$ 14 | ^ \* ? "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY$ 15 | ^ \* ? KIND, either express or implied\. See the License for the$ 16 | ^ \* ? specific language governing permissions and limitations$ 17 | ^ \* ? under the License\.$ 18 | ^ \*.* -------------------------------------------------------------------------------- /src/test-resources/bugs/BUG-GROOVY-5318.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | def a= new java.util.ArrayList>() -------------------------------------------------------------------------------- /src/test-resources/bugs/BUG-GROOVY-9692.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | def result = [1, 2, 3] { 21 | "world" 22 | } 23 | -------------------------------------------------------------------------------- /src/test-resources/core/PackageDeclaration_04.groovy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env groovy 2 | /* 3 | * Licensed to the Apache Software Foundation (ASF) under one 4 | * or more contributor license agreements. See the NOTICE file 5 | * distributed with this work for additional information 6 | * regarding copyright ownership. The ASF licenses this file 7 | * to you under the Apache License, Version 2.0 (the 8 | * "License"); you may not use this file except in compliance 9 | * with the License. You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, 14 | * software distributed under the License is distributed on an 15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | * KIND, either express or implied. See the License for the 17 | * specific language governing permissions and limitations 18 | * under the License. 19 | */ 20 | package com.groovyhelp.core; -------------------------------------------------------------------------------- /src/test-resources/fail/AnnotationDeclaration_01x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | @interface A { 21 | void a() 22 | } 23 | -------------------------------------------------------------------------------- /src/test-resources/fail/SealedTypeDeclaration_03x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | non-sealed @interface ShapeI { } 21 | 22 | -------------------------------------------------------------------------------- /src/test/groovy/groovy/script/scriptWithClosure.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | a = 1 20 | [1].each { 21 | a = it 22 | } 23 | -------------------------------------------------------------------------------- /subprojects/groovy-groovysh/src/test/resources/groovy7777script: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env groovy 2 | /* 3 | * Licensed to the Apache Software Foundation (ASF) under one 4 | * or more contributor license agreements. See the NOTICE file 5 | * distributed with this work for additional information 6 | * regarding copyright ownership. The ASF licenses this file 7 | * to you under the Apache License, Version 2.0 (the 8 | * "License"); you may not use this file except in compliance 9 | * with the License. You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, 14 | * software distributed under the License is distributed on an 15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | * KIND, either express or implied. See the License for the 17 | * specific language governing permissions and limitations 18 | * under the License. 19 | */ 20 | 21 | myvar = 42 -------------------------------------------------------------------------------- /subprojects/groovy-templates/src/spec/test-resources/locale_include_fr_FR.tpl: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | yield 'Texte en français' -------------------------------------------------------------------------------- /subprojects/groovy-templates/src/spec/test-resources/other_template.tpl: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | yield 'included as a template' -------------------------------------------------------------------------------- /subprojects/groovy-templates/src/test/resources/includes/typecheckedinclude.tpl: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | yield text.toUpperCase() -------------------------------------------------------------------------------- /config/bnd/groovy-all.bnd: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | version= @GROOVY_BUNDLE_VERSION@ 17 | -nouses= true 18 | Export-Package= *;version=${version} 19 | Import-Package= *;resolution:=optional 20 | -------------------------------------------------------------------------------- /src/test-resources/core/PackageDeclaration_05.groovy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env groovy 2 | /* 3 | * Licensed to the Apache Software Foundation (ASF) under one 4 | * or more contributor license agreements. See the NOTICE file 5 | * distributed with this work for additional information 6 | * regarding copyright ownership. The ASF licenses this file 7 | * to you under the Apache License, Version 2.0 (the 8 | * "License"); you may not use this file except in compliance 9 | * with the License. You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, 14 | * software distributed under the License is distributed on an 15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | * KIND, either express or implied. See the License for the 17 | * specific language governing permissions and limitations 18 | * under the License. 19 | */ 20 | package com.groovyhelp.core; 21 | -------------------------------------------------------------------------------- /src/test-resources/fail/ClassDeclaration_01x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | class Foo {} 20 | new Foo() { 21 | Foo() {} 22 | } 23 | -------------------------------------------------------------------------------- /src/test-resources/fail/RecordDeclaration_12x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package core 20 | 21 | abstract record Bad(int x) { } 22 | -------------------------------------------------------------------------------- /src/test-resources/core/Expression_02.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | assert (1) 20 | assert ( 21 | 1) 22 | assert ( 23 | 1 24 | ) -------------------------------------------------------------------------------- /src/test-resources/core/Literal_03.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | /\123 \/ abc \u1234 \r\n\$/ 21 | 22 | $/\123 \/ abc \u1234 \r\n/$ 23 | -------------------------------------------------------------------------------- /src/test-resources/core/While_02x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | int i = 0 20 | while (i < 5) { 21 | i++ 22 | } 23 | assert 5 == i; 24 | -------------------------------------------------------------------------------- /src/test-resources/fail/RecordDeclaration_04x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package core 20 | 21 | sealed record Fruit(String name) {} 22 | -------------------------------------------------------------------------------- /src/test-resources/fail/SealedTypeDeclaration_02x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | sealed enum ShapeI permits Circle, Rectangle { } 21 | -------------------------------------------------------------------------------- /src/test-resources/fail/Super_02x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | class A { 20 | A() { 21 | (Object) super 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/test-resources/fail/Trait_01.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package fail 20 | 21 | trait Trait_01 { 22 | abstract m() {} 23 | } 24 | -------------------------------------------------------------------------------- /src/test-resources/groovy/bugs/groovy7799/EE.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package groovy.bugs.groovy7799 20 | 21 | interface EE { 22 | } 23 | -------------------------------------------------------------------------------- /src/test/groovy/bugs/Groovy4104B.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package bugs; 20 | 21 | public class Groovy4104B extends Groovy4104A { } 22 | -------------------------------------------------------------------------------- /src/test/groovy/bugs/scriptForGroovy3934.groovy: -------------------------------------------------------------------------------- 1 | package bugs 2 | /* 3 | * Licensed to the Apache Software Foundation (ASF) under one 4 | * or more contributor license agreements. See the NOTICE file 5 | * distributed with this work for additional information 6 | * regarding copyright ownership. The ASF licenses this file 7 | * to you under the Apache License, Version 2.0 (the 8 | * "License"); you may not use this file except in compliance 9 | * with the License. You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, 14 | * software distributed under the License is distributed on an 15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | * KIND, either express or implied. See the License for the 17 | * specific language governing permissions and limitations 18 | * under the License. 19 | */ 20 | 21 | return 'GROOVY3934Helper script called' 22 | -------------------------------------------------------------------------------- /src/test/groovy/groovy/script/scriptArgs.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | for (a in args) { 20 | println("Argument: " + a) 21 | } 22 | 23 | -------------------------------------------------------------------------------- /subprojects/groovy-ant/src/test-resources/org/codehaus/groovy/ant/params.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | configuration.parameters=true 21 | -------------------------------------------------------------------------------- /src/test-resources/core/ImportDeclaration_06.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | import java.util.* 20 | import java.math.BigDecimal 21 | import java.io.* -------------------------------------------------------------------------------- /src/test-resources/fail/RecordDeclaration_02x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package core 20 | 21 | class Fruit(String name, double price) {} 22 | -------------------------------------------------------------------------------- /src/test-resources/fail/RecordDeclaration_05x.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package core 20 | 21 | non-sealed record Fruit(String name) {} 22 | -------------------------------------------------------------------------------- /src/test-resources/groovy/bugs/groovy9236/Type.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package groovy.bugs.groovy9236 20 | 21 | interface Type { 22 | } 23 | --------------------------------------------------------------------------------