File: Remove-use-of-javacc-gradle-plugin.patch

package info (click to toggle)
adql 2.0~beta%2Bds-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,560 kB
  • sloc: java: 21,916; sh: 132; makefile: 17
file content (51 lines) | stat: -rw-r--r-- 2,246 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
From: Ole Streicher <olebole@debian.org>
Date: Fri, 8 Dec 2023 11:05:41 +0100
Subject: Remove use of javacc gradle plugin

This plugin is not available in Debian
---
 ADQLLib/build.gradle | 27 ---------------------------
 1 file changed, 27 deletions(-)

diff --git a/ADQLLib/build.gradle b/ADQLLib/build.gradle
index 5253b7f..574bff0 100644
--- a/ADQLLib/build.gradle
+++ b/ADQLLib/build.gradle
@@ -1,7 +1,3 @@
-plugins {
-    id "org.javacc.javacc" version "3.0.0"
-}
-
 // Describe the library:
 version = "2.0-beta"
 description = "Java library to parse, analyze and transform ADQL queries."
@@ -23,29 +19,6 @@ jar {
     exclude('adql/example/**')
 }
 
-/* ##########################################################################
- * # GRAMMAR CLASSES GENERATION (for ADQL-2.0 and 2.1)                      #
- * ########################################################################## */
-
-compileJavacc {
-    inputDirectory  = file('src/adql/parser/grammar')
-    outputDirectory = file(project.buildDir.absolutePath + '/generated/adql/parser/grammar')
-    /* Note: the 'generated/' directory is by default included in the classpath
-     *       set up by Gradle. Hence the output directory being this one. */
-    arguments = [grammar_encoding: 'UTF-8', static: 'false']
-}
-
-// Remove generated classes extended and included in 'src/adql/parser/grammar/':
-/* Note: theoretically JavaCC does not re-generate the following files if they
- *       already exist in the classpath. However, for some reason, the Gradle
- *       plugin used here is unable to see these files. Hence this custom
- *       task to remove these generated files. */
-compileJavacc.doLast {
-    delete project.buildDir.absolutePath + '/generated/adql/parser/grammar/ParseException.java'
-    delete project.buildDir.absolutePath + '/generated/adql/parser/grammar/SimpleCharStream.java'
-    delete project.buildDir.absolutePath + '/generated/adql/parser/grammar/Token.java'
-    delete project.buildDir.absolutePath + '/generated/adql/parser/grammar/TokenMgrError.java'
-}
 
 // Ensure the generated Java classes and examples are included in the classpath:
 sourceSets.main.java.srcDirs = ["src", "examples", project.buildDir.absolutePath+'/generated']