gradle.js 2.9 KB

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