-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
90 lines (75 loc) · 2.07 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
buildscript {
ext.version_antlr = '4.7'
ext.version_dokka = '0.9.13'
ext.version_option_result = '1.0.0'
ext.version_kotlin = '1.1.2-2'
repositories {
jcenter()
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$version_kotlin"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:$version_dokka"
}
}
apply plugin: 'java'
apply plugin: 'antlr'
apply plugin: 'maven'
apply plugin: 'kotlin'
apply plugin: 'jacoco'
apply plugin: 'org.jetbrains.dokka'
group = "com.github.sybila"
version = '3.0.0'
//antlr config
generateGrammarSource {
arguments += [
"-no-visitor",
"-listener"
]
}
// make the Java compile task depend on the antlr4 task
compileKotlin.dependsOn generateGrammarSource
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
testCompile "org.jetbrains.kotlin:kotlin-test:$version_kotlin"
compile "org.jetbrains.kotlin:kotlin-stdlib:$version_kotlin"
compile "com.github.daemontus:kotlin-option-result:$version_option_result"
antlr "org.antlr:antlr4:$version_antlr"
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
//archives javadocJar, sourcesJar
archives sourcesJar
}
jacocoTestReport {
reports {
xml.enabled = true
html.enabled = true
}
}
check.dependsOn jacocoTestReport
// verbose test logging
test {
testLogging {
events "skipped", "failed", "standardOut", "standardError"
}
void
}
dokka {
moduleName = "HUCTLp"
sourceDirs = files('src/main/java') // excludes generated antlr classes
includes = [
'src/main/java/com/github/sybila/package.md',
'src/main/java/com/github/sybila/huctl/package.md',
'src/main/java/com/github/sybila/huctl/parser/package.md',
'src/main/java/com/github/sybila/huctl/dsl/package.md'
]
}