-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
85 lines (73 loc) · 2.06 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
plugins {
id 'java'
}
group 'org.shijinglu'
version '0.1.2'
sourceCompatibility = 1.8
apply plugin: 'java'
apply plugin: 'antlr'
apply plugin: 'maven-publish'
repositories {
mavenLocal()
mavenCentral()
jcenter()
}
/**
* Without the next section Gradle will add a 'compile' dependency on Antlr3:
* https://github.com/gradle/gradle/issues/820
*/
configurations {
compile {
extendsFrom = extendsFrom.findAll { it != configurations.antlr }
}
}
dependencies {
antlr "org.antlr:antlr4:4.7.1"
implementation "org.antlr:antlr4-runtime:4.7.1"
testImplementation group: 'junit', name: 'junit', version: '4.12'
testImplementation 'org.mockito:mockito-core:2.7.22'
}
generateGrammarSource {
maxHeapSize = "64m"
// Keep a copy of generated sources
doLast {
println "Copying generated grammar lexer/parser files to main directory."
copy {
from "${buildDir}/generated-src/antlr/main"
into "generated-src/main/java"
}
}
}
clean.doLast {
file('generated-src').deleteDir()
}
// Publish to Maven Repository
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
maven(MavenPublication) {
groupId = 'org.shijinglu'
artifactId = 'lure-java'
version = "${version}"
from components.java
pom {
name = 'Lu\' Rule Engine'
description = 'A light ware DSL lib that handles rule evaluation'
developers {
developer {
id = 'shijinglu'
name = 'Shijing Lu'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:git://github.com/shijinglu/lure-java.git'
developerConnection = 'scm:git:ssh://github.com/shijinglu/lure-java.git'
url = 'https://github.com/shijinglu/lure-java'
}
}
}
}
}