-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
130 lines (95 loc) · 3.68 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
plugins {
id 'java-library'
id 'antlr'
id 'maven-publish'
id 'com.jfrog.bintray' version '1.8.4'
id 'de.clashsoft.simple-publish' version '0.6.0'
id 'de.clashsoft.gentreesrc-gradle' version '0.5.0'
}
apply from: 'gradle/functional-test.gradle'
apply from: 'gradle/webapp.gradle'
// --------------- Info ---------------
group = 'org.fulib'
version = 'git describe --tags'.execute().text[1..-2] // strip v and \n
description = 'A compiler for textual example scenarios.'
publishInfo {
organization = 'fujaba'
websiteUrl = 'https://www.fulib.org/'
githubRepo = 'fujaba/fulibScenarios'
labels = [ 'source', 'generator', 'scenario', 'markdown' ]
license {
name = 'BSD 3-Clause License'
url = 'https://opensource.org/licenses/BSD-3-Clause'
}
developer {
id = 'Clashsoft'
name = 'Adrian Kunz'
email = 'clashsoft@hotmail.com'
}
developer {
id = 'azuendorf'
name = 'Albert Zündorf'
email = 'zuendorf@uni-kassel.de'
}
}
bintray.pkg.userOrg = 'clashsoft'
sourceCompatibility = 1.8
// --------------- Dependencies ---------------
repositories {
mavenLocal()
mavenCentral()
jcenter()
}
dependencies {
// --------------- Build Tools ---------------
// https://mvnrepository.com/artifact/de.clashsoft/gentreesrc
gentreesrc group: 'de.clashsoft', name: 'gentreesrc', version: '0.10.1'
// https://mvnrepository.com/artifact/org.antlr/antlr4
antlr group: 'org.antlr', name: 'antlr4', version: '4.8'
// --------------- Fulib Libraries ---------------
// https://mvnrepository.com/artifact/org.fulib/fulib
api group: 'org.fulib', name: 'fulib', version: '1.3.0'
// https://mvnrepository.com/artifact/org.fulib/fulibTools
api group: 'org.fulib', name: 'fulibTools', version: '1.3.0'
// --------------- Other Libraries ---------------
// https://mvnrepository.com/artifact/org.apache.commons/commons-text
implementation group: 'org.apache.commons', name: 'commons-text', version: '1.9'
// https://mvnrepository.com/artifact/org.antlr/antlr4-runtime
implementation group: 'org.antlr', name: 'antlr4-runtime', version: '4.8'
// https://mvnrepository.com/artifact/commons-cli/commons-cli
implementation group: 'commons-cli', name: 'commons-cli', version: '1.4'
// https://mvnrepository.com/artifact/org.ow2.asm/asm
implementation group: 'org.ow2.asm', name: 'asm', version: '8.0.1'
// --------------- Test Dependencies ---------------
// https://mvnrepository.com/artifact/junit/junit
testImplementation group: 'junit', name: 'junit', version: '4.13'
// https://mvnrepository.com/artifact/org.fulib/fulibMockups
testImplementation group: 'org.fulib', name: 'fulibMockups', version: '[0.2.0,)'
// https://mvnrepository.com/artifact/org.fulib/fulibTables
testImplementation group: 'org.fulib', name: 'fulibTables', version: '1.4.0'
}
// --------------- Test Logging ---------------
tasks.withType(Test) {
testLogging {
showStandardStreams true
exceptionFormat 'FULL'
}
}
// --------------- ANTLR ---------------
def generatedANTLRDir = "$buildDir/generated-src/antlr/main/"
sourceSets.main.java.srcDir(generatedANTLRDir)
// https://stackoverflow.com/questions/40995727/gradle-cant-find-antlr-token-file
generateGrammarSource {
def packageName = 'org.fulib.scenarios.parser'
arguments += [ '-package', packageName ]
outputDirectory = file("$generatedANTLRDir/${ packageName.replace('.', '/') }/")
}
// https://github.com/gradle/gradle/issues/820
configurations.compile {
extendsFrom = extendsFrom.findAll { it != configurations.antlr }
}
// --------------- GenTreeSrc ---------------
gentreesrcJava {
visitDefault = true
visitParent = true
}