Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Fred Eisele
fql
Commits
9a8bbe8c
Commit
9a8bbe8c
authored
Dec 04, 2018
by
Fred Eisele
Browse files
update to gradle 5.0
parent
e35298bd
Changes
6
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
9a8bbe8c
...
...
@@ -20,3 +20,6 @@ buildSrc/build/
*.dvi
.gradle/
bin/
*.tokens
build.gradle
View file @
9a8bbe8c
...
...
@@ -91,9 +91,9 @@ task antlrGen (type: Antlr4Task) {
compileJava
.
dependsOn
antlrGen
// ./gradlew wrapper --gradle-version 5.0
wrapper
{
gradleVersion
=
'4.10.1'
distributionUrl
=
"https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
distributionType
=
Wrapper
.
DistributionType
.
ALL
}
...
...
buildSrc/src/main/groovy/org/babeloff/plugins/antlr/Antlr4Task.groovy
View file @
9a8bbe8c
...
...
@@ -34,29 +34,32 @@ class Antlr4Task extends DefaultTask {
* _ force-atn bool "use the ATN simulator for all predictions"
* _ log bool "dump lots of logging info to antlr-timestamp.log"]
*/
@Input
@Optional
String
maxHeapSize
;
@InputFile
String
lexerGrammar
;
@InputFile
String
parserGrammar
;
@InputDirectory
File
sourceDir
;
@OutputDirectory
File
targetDir
;
@Input
@Optional
String
encoding
;
@Input
@Optional
String
msgFormat
;
@Input
@Optional
String
module
;
@Input
@Optional
String
override
;
@Input
@Optional
Boolean
show
;
@Input
@Optional
Boolean
atn
;
@Input
@Optional
Boolean
longMsg
;
@Input
@Optional
Boolean
listener
;
@Input
@Optional
Boolean
visitor
;
@Input
@Optional
Boolean
depend
;
@Input
@Optional
Boolean
warnError
;
@Input
@Optional
Boolean
saveLexer
;
@Input
@Optional
Boolean
debugStrTempl
;
@Input
@Optional
Boolean
debugStrTemplWait
;
@Input
@Optional
Boolean
forceAtn
;
@Input
@Optional
Boolean
log
;
@InputFile
public
String
lexerGrammar
;
@InputFile
public
String
parserGrammar
;
@InputDirectory
public
File
sourceDir
;
@OutputDirectory
public
File
targetDir
;
@Input
@Optional
public
String
maxHeapSize
;
@Input
@Optional
public
String
encoding
;
@Input
@Optional
public
String
msgFormat
;
@Input
@Optional
public
String
module
;
@Input
@Optional
public
String
override
;
@Input
@Optional
public
Boolean
show
;
@Input
@Optional
public
Boolean
atn
;
@Input
@Optional
public
Boolean
longMsg
;
@Input
@Optional
public
Boolean
listener
;
@Input
@Optional
public
Boolean
visitor
;
@Input
@Optional
public
Boolean
depend
;
@Input
@Optional
public
Boolean
warnError
;
@Input
@Optional
public
Boolean
saveLexer
;
@Input
@Optional
public
Boolean
debugStrTempl
;
@Input
@Optional
public
Boolean
debugStrTemplWait
;
@Input
@Optional
public
Boolean
forceAtn
;
@Input
@Optional
public
Boolean
log
;
Antlr4Task
()
{
description
=
'An antlr4 grammar generates a java parser'
...
...
@@ -67,26 +70,28 @@ class Antlr4Task extends DefaultTask {
void
start
()
{
ArrayList
<
String
>
args
=
new
ArrayList
<>();
args
.
push
(
'-o'
);
args
.
push
(
targetDir
.
canonicalFile
.
toString
())
args
.
add
(
'-o'
);
args
.
add
(
targetDir
.
canonicalFile
.
toString
())
logger
.
quiet
'target dir: '
+
targetDir
.
canonicalFile
args
.
push
(
'-lib'
);
args
.
push
(
sourceDir
.
canonicalFile
.
toString
())
args
.
add
(
'-lib'
);
args
.
add
(
sourceDir
.
canonicalFile
.
toString
())
logger
.
quiet
'source dir: '
+
sourceDir
.
canonicalFile
args
.
push
(
'-package'
)
args
.
push
(
module
)
args
.
add
(
'-package'
)
args
.
add
(
module
)
def
lexerArgs
=
args
.
clone
();
lexerArgs
.
push
(
lexerGrammar
);
lexerArgs
.
add
(
lexerGrammar
);
String
[]
lexerArgsArray
=
lexerArgs
.
toArray
(
new
String
[
lexerArgs
.
size
()]);
logger
.
quiet
'lexer: '
+
lexerArgsArray
;
try
{
Tool
lexerTool
=
new
Tool
(
lexerArgsArray
);
lexerTool
.
processGrammarsOnCommandLine
();
}
catch
(
Exception
ex
)
{
logger
.
quiet
'lexer: '
+
lexerArgsArray
;
logger
.
quiet
'cause: '
+
ex
.
getLocalizedMessage
();
throw
new
GradleException
(
ex
.
message
)
}
...
...
gradle/wrapper/gradle-wrapper.jar
View file @
9a8bbe8c
No preview for this file type
gradle/wrapper/gradle-wrapper.properties
View file @
9a8bbe8c
distributionBase
=
GRADLE_USER_HOME
distributionPath
=
wrapper/dists
distributionUrl
=
https
\:
//services.gradle.org/distributions/gradle-
4.10.1
-all.zip
distributionUrl
=
https
\:
//services.gradle.org/distributions/gradle-
5.0
-all.zip
zipStoreBase
=
GRADLE_USER_HOME
zipStorePath
=
wrapper/dists
logback.xml
0 → 100644
View file @
9a8bbe8c
<configuration>
<appender
name=
"STDOUT"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<!-- encoders are assigned the type
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
<encoder>
<pattern>
%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
</appender>
<root
level=
"debug"
>
<appender-ref
ref=
"STDOUT"
/>
</root>
</configuration>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment