forked from turpid-monkey/LuaAutoComplete
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
132 lines (106 loc) · 3.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
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
131
apply plugin: 'java'
apply plugin: 'me.champeau.gradle.antlr4'
apply plugin: 'maven-publish'
apply plugin: 'jacoco'
apply plugin: 'com.github.kt3k.coveralls'
apply plugin: 'eclipse'
apply plugin: 'com.jfrog.artifactory'
version = '0.2-SNAPSHOT'
group = 'edu.gcsc.lua'
if (System.env['TRAVIS'] != null) {
project.ext.set ("buildInfo.build.number", System.env.TRAVIS_BUILD_NUMBER)
project.ext.set ("buildInfo.build.name", rootProject.name)
} else {
project.ext.set ("buildInfo.build.number", '0' )
project.ext.set ("buildInfo.build.name", rootProject.name+"-local")
}
jar.dependsOn compileJava
compileJava.dependsOn antlr4
sourceCompatibility = '1.6'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
task wrapper(type: Wrapper) {
gradleVersion = '2.1'
}
compileJava {
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
antlr4 {
output=file('src/main/java/edu/gcsc/lua/grammar')
extraArgs =['-package','edu.gcsc.lua.grammar']
}
artifacts {
archives sourcesJar
}
jacocoTestReport {
reports {
xml.enabled = true // coveralls plugin depends on xml format report
html.enabled = true
}
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
}
}
}
repositories {
mavenCentral()
maven {
name 'jcenter'
url 'http://jcenter.bintray.com'
}
}
buildscript {
repositories {
maven {
name 'JFrog OSS snapshot repo'
url 'https://oss.jfrog.org/oss-snapshot-local/'
}
// hopefully fixes #1 (https://github.com/turpid-monkey/LuaCompletionProvider/issues/1)
// jcenter()
maven {
name 'jcenter'
url 'http://jcenter.bintray.com'
}
maven {
url 'http://oss.jfrog.org/artifactory/plugins-release'
}
}
dependencies {
classpath 'me.champeau.gradle:antlr4-gradle-plugin:0.1'
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.0.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0'
classpath(group: 'org.jfrog.buildinfo', name: 'build-info-extractor-gradle', version: '3.0.1')
}
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.10'
testCompile group: 'org.easymock', name: 'easymock', version: '3.3'
compile (group: 'org.antlr', name: 'antlr4', version: '4.2')
compile (group: 'org.antlr', name: 'antlr4', version: '4.2', classifier: 'sources')
}
artifactory {
contextUrl = "http://oss.jfrog.org/artifactory"
publish {
repository {
repoKey = 'oss-snapshot-local'
username = "turpid-monkey"
password = System.getenv()['bintrayKey']
maven = true
}
defaults {
publications ('mavenJava')
}
}
resolve {
repository {
repoKey = 'libs-release'
maven = true
}
}
}