-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
63 lines (53 loc) · 1.43 KB
/
Copy pathbuild.gradle
File metadata and controls
63 lines (53 loc) · 1.43 KB
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
plugins {
id 'java-library'
id 'maven-publish'
id 'com.diffplug.spotless' version '5.7.0'
id 'org.sonarqube' version '3.0'
id 'jacoco'
}
group = 'com.workap.nlp'
archivesBaseName = "chikkar"
version = '0.1.0-SNAPSHOT'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
implementation 'com.worksap.nlp:jdartsclone:1.2.0', 'com.worksap.nlp:sudachi:0.5.0'
testImplementation 'junit:junit:4.13.1', 'org.hamcrest:hamcrest:2.1'
}
['system', 'user', 'user2'].each { name ->
def taskName = "buildDict${name.capitalize()}"
task "${taskName}"(type: JavaExec) {
main = "com.worksap.nlp.chikkar.dictionary.DictionaryBuilder"
classpath = sourceSets.main.runtimeClasspath
args('-o', "build/resources/test/${name}.dic", '-d', "the ${name} dictionary for the unit tests", "src/test/dict/${name}.csv")
dependsOn processTestResources
}
test.dependsOn taskName
}
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives javadocJar, sourcesJar
}
spotless {
java {
eclipse().configFile('.formatter/eclipse-formatter.xml')
removeUnusedImports()
licenseHeaderFile '.formatter/license-header'
}
}
jacocoTestReport {
reports {
xml.enabled true
}
dependsOn test
}