-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
77 lines (66 loc) · 1.96 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
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.amazonaws:aws-java-sdk-core:1.11.+'
}
}
apply plugin: "java"
apply plugin: 'groovy'
apply plugin: "maven"
apply plugin: 'maven-publish'
apply plugin: 'idea'
apply plugin: 'antlr'
group 'com.giftbit'
version new groovy.json.JsonSlurper().parseText(new File("package.json").text)["version"]
sourceCompatibility = JavaVersion.VERSION_1_8
repositories {
mavenCentral()
jcenter()
}
dependencies {
compile 'org.codehaus.groovy:groovy-all:2.4.7'
testCompile "org.spockframework:spock-core:1.0-groovy-2.4"
antlr "org.antlr:antlr4:4.7"
}
jar {
from sourceSets.main.output
from sourceSets.main.allSource
}
publishing {
repositories {
maven {
name 'Giftbit private repo'
url 's3://giftbit-maven.s3-us-west-2.amazonaws.com/'
credentials(AwsCredentials) {
def defaultCredentials = new com.amazonaws.auth.DefaultAWSCredentialsProviderChain().credentials
accessKey defaultCredentials.AWSAccessKeyId
secretKey defaultCredentials.AWSSecretKey
}
}
}
publications {
maven(MavenPublication) {
groupId 'com.giftbit'
from components.java
}
}
}
generateGrammarSource {
maxHeapSize = "128m"
arguments += ["-visitor", "-long-messages", "-package", "com.giftbit.ruleslib"]
}
task generateJavaScriptGrammarSource(type: AntlrTask) {
source = sourceSets.main.antlr
outputDirectory = file("${project.buildDir}/generated-src/antlr/js")
maxHeapSize = "128m"
arguments += ["-visitor", "-long-messages", "-Dlanguage=JavaScript"]
}
task copyJavaScriptGrammarSource(type: Copy) {
dependsOn generateJavaScriptGrammarSource
from "${project.buildDir}/generated-src/antlr/js/com/giftbit/ruleslib"
include "*.js"
into "${project.rootDir}/src/main/typescript/antlrgen"
}