OSDN Git Service

Externalize test utility as individual library
[dictzip-java/dictzip-java.git] / build.gradle
1 // common settings
2 subprojects {
3   apply plugin: 'java'
4   apply plugin: 'jacoco'
5   apply plugin: 'checkstyle'
6   apply plugin: 'findbugs'
7
8   sourceCompatibility = '1.7'
9   targetCompatibility = '1.7'
10   [compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
11   [compileJava, compileTestJava]*.options*.bootClasspath = "$JDK7_HOME/jre/lib/rt.jar"
12   checkstyle {
13     config = resources.text.fromFile("${rootProject.projectDir}/config/checkstyle/checkstyle.xml")
14     ignoreFailures = true
15     toolVersion = '6.16.1'
16   }
17
18   // Force prevent checkstyle/findbugs on Test.
19   task checkstyleTest(overwrite: true) << {}
20   task findbugsTest(overwrite: true) << {}
21   tasks.withType(FindBugs) {
22     reports {
23       xml.enabled = false
24       html.enabled = true
25     }
26   }
27
28   repositories {
29     mavenLocal()
30     jcenter()
31     mavenCentral()
32   }
33
34   dependencies {
35     testCompile 'org.testng:testng:6.9.10'
36   }
37
38   test {
39     useTestNG()
40   }
41 }
42
43 project(':dictzip-lib') {
44   dependencies {
45     testCompile 'tokyo.northside:northside-io:0.2.0'
46   }
47 }
48
49 project(':dictzip-cli') {
50   apply plugin: 'application'
51   mainClassName = 'org.dict.zip.cli.Main'
52   applicationName = 'DictZip'
53
54   dependencies {
55     compile project(':dictzip-lib'),
56        'commons-codec:commons-codec:1.10',
57        'gnu.getopt:java-getopt:1.0.13'
58     testCompile 'tokyo.northside:northside-io:0.2.0'
59   }
60 }