-
Notifications
You must be signed in to change notification settings - Fork 11
/
build.gradle
93 lines (75 loc) · 2.12 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
plugins {
id "java-library"
id "antlr"
id "jacoco"
id "idea"
id 'maven-publish'
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(11))
}
}
// Project Info
group 'net.moonlightflower'
version '1.2.2'
repositories {
mavenCentral()
jcenter()
maven { url 'https://jitpack.io' }
}
dependencies {
antlr "org.antlr:antlr4:4.13.1"
// Logging
implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.4.11'
// Libs
implementation group: 'com.github.inwc3', name: 'jmpq3', version: '264c54cfc8'
implementation group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.2'
implementation group: 'com.dorkbox', name: 'PeParser', version: '3.3'
implementation group: 'com.dorkbox', name: 'PeParser-Dorkbox-Util', version: '2.7'
implementation group: 'com.twelvemonkeys.imageio', name: 'imageio-jpeg', version: '3.9.4'
implementation 'com.jcraft:jzlib:1.1.3'
// TestNG
testImplementation 'org.testng:testng:7.8.0'
}
test {
useTestNG()
}
jacocoTestReport {
reports {
xml.required.set(true)
}
}
task sourcesJar(type: Jar) {
dependsOn 'generateGrammarSource'
archiveClassifier.set('sources')
from sourceSets.main.allSource
}
artifacts {
archives jar
archives sourcesJar
}
task cleanAntlrDir {
delete "${buildDir}/generated-src/"
delete fileTree("src/main/java/net/moonlightflower/wc3libs/antlr").include('*.*')
}
generateGrammarSource { doLast {
println "Copying generated grammar lexer/parser files to main directory."
copy {
from "${buildDir}/generated-src/antlr/main"
into "src/main/java/net/moonlightflower/wc3libs/antlr"
}
project.delete fileTree("${buildDir}/generated-src/antlr/main").include('*.*')
}}
generateGrammarSource.dependsOn cleanAntlrDir
compileJava.dependsOn generateGrammarSource
publishing {
publications {
maven(MavenPublication) {
groupId = 'inwc3'
artifactId = 'wc3libs'
from components.java
}
}
}