forked from crowdin/crowdin-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
executable file
·143 lines (119 loc) · 4.02 KB
/
build.gradle
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
import com.github.spotbugs.snom.SpotBugsReport
import static de.fayard.refreshVersions.core.Versions.versionFor
plugins {
id 'java'
id 'com.github.johnrengelman.shadow'
id 'jacoco'
id 'com.github.spotbugs'
id 'org.asciidoctor.jvm.convert'
}
group 'com.crowdin'
version '3.19.2'
sourceCompatibility = 1.8
if (!hasProperty('mainClass')) {
ext.mainClass = 'com.crowdin.cli.Cli'
}
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
repositories {
mavenCentral()
maven { url 'https://jitpack.io'}
maven {
url "https://repo1.maven.org/maven2"
}
}
dependencies {
implementation 'org.json:json:_'
implementation 'commons-cli:commons-cli:_'
implementation 'org.apache.logging.log4j:log4j-api:_'
implementation 'org.apache.logging.log4j:log4j-core:_'
implementation 'org.yaml:snakeyaml:_'
implementation 'commons-io:commons-io:_'
implementation 'javax.activation:activation:_'
implementation 'org.apache.commons:commons-lang3:_'
implementation 'net.lingala.zip4j:zip4j:_'
implementation 'net.ricecode:string-similarity:_'
implementation 'io.github.cdimascio:dotenv-java:_'
implementation 'org.apache.httpcomponents:httpclient:_'
compileOnly 'org.projectlombok:lombok:_'
annotationProcessor 'org.projectlombok:lombok:_'
testCompileOnly 'org.projectlombok:lombok:_'
testAnnotationProcessor 'org.projectlombok:lombok:_'
implementation 'com.github.crowdin:crowdin-api-client-java:_'
testImplementation Testing.junit.jupiter
testImplementation Testing.hamcrest
testImplementation Testing.mockito.core
}
dependencies {
implementation "info.picocli:picocli:_"
annotationProcessor "info.picocli:picocli-codegen:_"
}
jar {
manifest {
attributes 'Implementation-Title': 'Crowdin CLI',
'Implementation-Version': archiveVersion,
'Main-Class': 'com.crowdin.cli.Cli'
}
}
shadowJar {
setArchivesBaseName('crowdin-cli')
getArchiveClassifier().set('')
minimize {
exclude(dependency('org.apache.httpcomponents:httpclient'))
exclude(dependency('com.fasterxml.jackson.core:jackson-databind'))
exclude(dependency('info.picocli:picocli'))
exclude(dependency('info.picocli:picocli-codegen'))
}
}
test {
useJUnitPlatform()
}
jacoco {
toolVersion = versionFor(project, "version.jacoco")
reportsDirectory = file("$buildDir/reports")
}
jacocoTestReport {
reports {
xml.required = true
csv.required = false
xml.destination file("${buildDir}/coverage.xml")
}
getExecutionData().setFrom("$buildDir/jacoco/test.exec")
}
/////////////////////////
// STATIC ANALYSIS //////
/////////////////////////
spotbugs {
ignoreFailures = false
excludeFilter = file("config/spotbugs/excludeFilter.xml")
}
spotbugsMain {
onlyIf {project.hasProperty('staticAnalysisMarker')}
reports(({
html {
required = true
destination = file("$buildDir/reports/staticAnalysis/spotbugs-main.html")
stylesheet = 'fancy-hist.xsl'
}
} as Closure<NamedDomainObjectContainer<? extends SpotBugsReport>>))
}
spotbugsTest {
onlyIf {project.hasProperty('staticAnalysisMarker')}
reports(({
html {
required = true
destination = file("$buildDir/reports/staticAnalysis/spotbugs-test.html")
stylesheet = 'fancy-hist.xsl'
}
} as Closure<NamedDomainObjectContainer<? extends SpotBugsReport>>))
}
task staticAnalysis(type: GradleBuild) {
tasks = ['spotbugsMain', 'spotbugsTest']
}
task generateManpageAsciiDoc(type: JavaExec) {
dependsOn(classes)
group = "Documentation"
description = "Generate AsciiDoc manpage"
classpath(configurations.compileClasspath, configurations.annotationProcessor, sourceSets.main.runtimeClasspath)
main 'picocli.codegen.docgen.manpage.ManPageGenerator'
args "com.crowdin.cli.commands.picocli.RootCommand", "--outdir=website/generated-picocli-docs", "-v" //, "--template-dir=website/mantemplates"
}