-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproject.rb
executable file
·87 lines (74 loc) · 2.49 KB
/
project.rb
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
-> {
#$lithium_options['v'] = 2
$lithium_options['app_server_root'] = File.join($lithium_code, '..', 'tomcat', 'webapps')
Touch('touch:*')
UglifiedJSFile('minjs:**/*.min.js')
NodejsModule('npm:**/node_modules/*')
RunMaven('mvn:*')
MATCH("run:*") {
RunJavaCode('.lithium/lib/JavaTools.java') {
DefaultClasspath {
JOIN('.lithium/classes')
}
}
RunJavaCode ('**/*.java')
RunNodejs ('**/*.js')
RunPythonScript ('**/*.py')
RunPhpScript ('**/*.php')
RunShell ('**/*.sh')
RunJAR ('**/*.jar')
RunMaven ('**/pom.xml')
RunGroovyScript ('**/*.groovy')
RunKotlinCode ('**/*.kt')
RunScalaCode ('**/*.scala')
RunJavaClass ('**/*.class')
RunHtml ('**/*.html')
RunRubyScript ('**/*.rb')
}
MATCH("test:*") {
RunJavaCodeWithJUnit('**/*.java')
RunJavaClassWithJUnit('**/*.class')
RunMaven('**/pom.xml') {
TARGETS('test')
}
}
MATCH("compile:*") {
JavaCompiler('.lithium/lib/JavaTools.java') {
@destination = '.lithium/classes'
}
JavaCompiler ('**/*.java')
GroovyCompiler ('**/*.groovy')
KotlinCompiler ('**/*.kt')
ScalaCompiler ('**/*.scala')
ValidateRubyScript ('**/*.rb')
ValidatePhpScript ('**/*.php')
TypeScriptCompiler ('**/*.ts')
RunNodejs ('**/*.js') { OPT '--check' }
ValidatePythonScript('**/*.py')
MavenCompiler ('**/pom.xml')
ValidateXML ('**/*.xml')
CompileTTGrammar ('**/*.tt')
CompileSass ('**/*.sass')
BuildVaadinSass ('VAADIN/**/*.scss')
GroupByExtension('**/*') {
DO { | ext |
Project.build("compile:#{@name}#{ext}")
}
}
}
MATCH('check:*') {
JavaCheckStyle('**/*.java')
JavaScriptHint('**/*.js')
GroupByExtension('**/*') {
DO { | ext |
Project.build("check:#{@name}#{ext}")
}
}
}
PMD('pmd:**/*.java')
#MavenJarFile('mavenjar:**/*.jar')
# TODO: grep class already fetch lithium arguments
GREP('grep:') {
@grep = $lithium_args[0] if $lithium_args.length > 0
}
}