gradle.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. /*
  2. Language: Gradle
  3. Description: Gradle is an open-source build automation tool focused on flexibility and performance.
  4. Website: https://gradle.org
  5. Author: Damian Mee <mee.damian@gmail.com>
  6. */
  7. function gradle(hljs) {
  8. const KEYWORDS = [
  9. "task",
  10. "project",
  11. "allprojects",
  12. "subprojects",
  13. "artifacts",
  14. "buildscript",
  15. "configurations",
  16. "dependencies",
  17. "repositories",
  18. "sourceSets",
  19. "description",
  20. "delete",
  21. "from",
  22. "into",
  23. "include",
  24. "exclude",
  25. "source",
  26. "classpath",
  27. "destinationDir",
  28. "includes",
  29. "options",
  30. "sourceCompatibility",
  31. "targetCompatibility",
  32. "group",
  33. "flatDir",
  34. "doLast",
  35. "doFirst",
  36. "flatten",
  37. "todir",
  38. "fromdir",
  39. "ant",
  40. "def",
  41. "abstract",
  42. "break",
  43. "case",
  44. "catch",
  45. "continue",
  46. "default",
  47. "do",
  48. "else",
  49. "extends",
  50. "final",
  51. "finally",
  52. "for",
  53. "if",
  54. "implements",
  55. "instanceof",
  56. "native",
  57. "new",
  58. "private",
  59. "protected",
  60. "public",
  61. "return",
  62. "static",
  63. "switch",
  64. "synchronized",
  65. "throw",
  66. "throws",
  67. "transient",
  68. "try",
  69. "volatile",
  70. "while",
  71. "strictfp",
  72. "package",
  73. "import",
  74. "false",
  75. "null",
  76. "super",
  77. "this",
  78. "true",
  79. "antlrtask",
  80. "checkstyle",
  81. "codenarc",
  82. "copy",
  83. "boolean",
  84. "byte",
  85. "char",
  86. "class",
  87. "double",
  88. "float",
  89. "int",
  90. "interface",
  91. "long",
  92. "short",
  93. "void",
  94. "compile",
  95. "runTime",
  96. "file",
  97. "fileTree",
  98. "abs",
  99. "any",
  100. "append",
  101. "asList",
  102. "asWritable",
  103. "call",
  104. "collect",
  105. "compareTo",
  106. "count",
  107. "div",
  108. "dump",
  109. "each",
  110. "eachByte",
  111. "eachFile",
  112. "eachLine",
  113. "every",
  114. "find",
  115. "findAll",
  116. "flatten",
  117. "getAt",
  118. "getErr",
  119. "getIn",
  120. "getOut",
  121. "getText",
  122. "grep",
  123. "immutable",
  124. "inject",
  125. "inspect",
  126. "intersect",
  127. "invokeMethods",
  128. "isCase",
  129. "join",
  130. "leftShift",
  131. "minus",
  132. "multiply",
  133. "newInputStream",
  134. "newOutputStream",
  135. "newPrintWriter",
  136. "newReader",
  137. "newWriter",
  138. "next",
  139. "plus",
  140. "pop",
  141. "power",
  142. "previous",
  143. "print",
  144. "println",
  145. "push",
  146. "putAt",
  147. "read",
  148. "readBytes",
  149. "readLines",
  150. "reverse",
  151. "reverseEach",
  152. "round",
  153. "size",
  154. "sort",
  155. "splitEachLine",
  156. "step",
  157. "subMap",
  158. "times",
  159. "toInteger",
  160. "toList",
  161. "tokenize",
  162. "upto",
  163. "waitForOrKill",
  164. "withPrintWriter",
  165. "withReader",
  166. "withStream",
  167. "withWriter",
  168. "withWriterAppend",
  169. "write",
  170. "writeLine"
  171. ];
  172. return {
  173. name: 'Gradle',
  174. case_insensitive: true,
  175. keywords: KEYWORDS,
  176. contains: [
  177. hljs.C_LINE_COMMENT_MODE,
  178. hljs.C_BLOCK_COMMENT_MODE,
  179. hljs.APOS_STRING_MODE,
  180. hljs.QUOTE_STRING_MODE,
  181. hljs.NUMBER_MODE,
  182. hljs.REGEXP_MODE
  183. ]
  184. };
  185. }
  186. export { gradle as default };