FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
API-Examples/Android/APIExample/checkstyle.gradle at main · vince-hz/API-Examples · GitHub
vince-hz
/
API-Examples
Public
forked from
AgoraIO/API-Examples
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
API-Examples
/
Android
/
APIExample
/
checkstyle.gradle
Copy path
More file actions
More file actions
Latest commit
History
History
History
55 lines (45 loc) · 1.39 KB
Breadcrumbs
API-Examples
/
Android
/
APIExample
/
checkstyle.gradle
Copy path
File metadata and controls
55 lines (45 loc) · 1.39 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
apply
plugin
:
'
checkstyle
'
checkstyle
{
toolVersion
=
'
10.12.3
'
}
def
filterCheckstyleFiles
(
String
diffFiles
){
ArrayList<
String
>
filterList
=
new
ArrayList<
String
>
();
String
[] files
=
diffFiles
.
split(
"
\\
n
"
)
for
(
String
file
: files) {
if
(file
.
endsWith(
"
.java
"
)
||
file
.
endsWith(
"
.xml
"
)
||
file
.
endsWith(
"
.properties
"
)
) {
filterList
.
add(file)
}
}
return
filterList
}
task
checkstyle
(
type
:
Checkstyle
) {
source
'
src
'
exclude
'
**/gen/**
'
exclude
'
**/test/**
'
exclude
'
**/androidTest/**
'
exclude
'
**/R.java
'
exclude
'
**/BuildConfig.java
'
exclude
'
**/authpack.java
'
if
(project
.
hasProperty(
'
commit_diff_files
'
)) {
def
ft
=
filterCheckstyleFiles(project
.
property(
'
commit_diff_files
'
))
if
(ft
.
size()
>
0
) {
for
(
int
i
=
0
; i
<
ft
.
size(); i
++
) {
String
splitter
=
ft[i];
String
[] fileName
=
splitter
.
split(
"
/
"
);
include
'
**/
'
+
fileName[fileName
.
size()
-
1
];
}
}
else
{
include
'
null
'
}
println
(
"
checkstyle >> check commit diff files...
"
)
println
(
"
checkstyle >>
"
+
includes
.
toList())
}
else
{
include
'
**/*.java
'
println
(
"
checkstyle >> check all java files...
"
)
}
configFile
new
File
(rootDir,
"
checkstyle.xml
"
)
classpath
=
files()
}
Back
|
FazBrowse Home
|
New Git URL