-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.gradle
112 lines (90 loc) · 2.2 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
buildscript {
ext.kotlin_version = '1.3.61'
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
plugins{
id 'com.github.johnrengelman.shadow' version '5.2.0'
id 'org.jmailen.kotlinter' version '2.3.2'
id 'antlr'
}
group 'Crowbar'
version '1.1.2'
apply plugin: 'kotlin'
repositories {
mavenCentral()
}
test {
useJUnitPlatform()
}
wrapper {
gradleVersion = '5.6.3'
}
sourceSets {
main {
java.srcDirs += 'build/generated-src/main'
kotlin.srcDirs += 'build/generated-src/main'
antlr.srcDirs += 'src/main/antlr'
}
}
dependencies {
testImplementation("io.kotlintest:kotlintest-runner-junit5:3.4.0")
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation fileTree(dir: 'lib', include: ['*.jar'])
implementation("com.github.ajalt:clikt:2.3.0")
implementation "org.antlr:antlr4:4.8"
antlr "org.antlr:antlr4:4.8"
}
kotlinter {
disabledRules = ['no-multi-spaces', 'no-wildcard-imports']
}
lintKotlinMain {
exclude '**/data/**'
exclude '**/rule/**'
exclude '**/main/**'
exclude '**/tree/**'
exclude '**/types/**'
exclude '**/interfaces/ABSInterface.kt'
exclude '**/interfaces/SMTInterface.kt'
}
lintKotlinTest {
exclude '*'
}
formatKotlinMain {
exclude '**/data/**'
exclude '**/rule/**'
exclude '**/main/**'
exclude '**/tree/**'
exclude '**/types/**'
exclude '**/interfaces/ABSInterface.kt'
exclude '**/interfaces/SMTInterface.kt'
}
formatKotlinTest {
exclude '*'
}
generateGrammarSource {
outputDirectory = file("build/generated-src/main/antlr/crowbar/gen")
arguments += ["-visitor"]
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
jar {
manifest {
attributes 'Main-Class': 'org.abs_models.crowbar.main.MainKt'
}
}
shadowJar{
archiveFileName = "crowbar.${extension}"
}
compileKotlin.dependsOn generateGrammarSource
lintKotlinMain.dependsOn generateGrammarSource
assemble.dependsOn shadowJar