This repository has been archived by the owner on Jun 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
136 lines (117 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
131
132
133
134
135
136
group 'co.llective.hyena'
version '0.1-SNAPSHOT'
buildscript {
ext.kotlin_version = '1.2.31'
repositories {
maven { url "http://nexus.cs.int/repository/maven-central/" }
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.junit.platform:junit-platform-gradle-plugin:1.0.0"
}
}
apply plugin: 'kotlin'
apply plugin: 'application'
apply plugin: 'org.junit.platform.gradle.plugin'
apply plugin: 'maven-publish'
mainClassName = "co.llective.hyena.repl.MainKt"
junitPlatform {
filters {
engines {
include 'spek'
}
}
}
repositories {
maven { url "http://nexus.cs.int/repository/maven-central/" }
mavenCentral()
maven { url "http://clojars.org/repo/" }
maven { url "http://dl.bintray.com/jetbrains/spek" }
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
compile group: 'org.python', name: 'jython-standalone', version: '2.5.2'
compile group: 'com.google.guava', name: 'guava', version: '23.1-jre'
compile group: 'io.airlift', name: 'log', version: '0.150'
compile group: 'io.airlift', name: 'configuration', version: '0.150'
compile group: 'io.airlift', name: 'bootstrap', version: '0.150'
compile group: 'cs', name: 'jnanomsg', version: '0.4.5'
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.6'
compile group: 'commons-cli', name: 'commons-cli', version: '1.4'
compile group: 'io.airlift', name: 'slice', version: '0.33'
testCompile 'org.jetbrains.spek:spek-api:1.1.5'
testCompile group: 'com.natpryce', name: 'hamkrest', version: '1.4.2.2'
testCompile group: 'com.nhaarman', name: 'mockito-kotlin', version: '1.5.0'
testCompile group: 'org.jetbrains.kotlin', name: 'kotlin-reflect', version: '1.2.31'
testRuntime 'org.jetbrains.spek:spek-junit-platform-engine:1.1.5'
testRuntime 'org.junit.platform:junit-platform-runner:1.0.1'
}
publishing {
publications {
maven(MavenPublication) {
groupId group
artifactId project.name + '-all'
pom.packaging 'jar'
artifact fatJar {
}
artifact sourcesJar {
}
}
}
repositories {
mavenLocal()
}
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
sourceSets {
main.kotlin.srcDirs += 'src/main/kotlin/'
}
task sourcesJar(type: Jar) {
classifier = "sources"
from sourceSets.main.allSource
}
task sourcedJar(type: Jar) {
from sourceSets.main.allSource
with jar
}
task fatJar(type: Jar) {
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
baseName = project.name + '-all'
with sourcedJar
}
task repledJar(type: Jar) {
manifest {
attributes 'Implementation-Title': 'Hyena API REPL',
'Implementation-Version': version,
'Main-Class': 'co.llective.hyena.repl.MainKt'
}
baseName = project.name + '-repl-all'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
task gentestJar(type: Jar) {
manifest {
attributes 'Implementation-Title': 'Hyena API REPL',
'Implementation-Version': version,
'Main-Class': 'co.llective.hyena.util.GenTestKt'
}
baseName = project.name + '-gentest'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
task parsemsgJar(type: Jar) {
manifest {
attributes 'Implementation-Title': 'Hyena API REPL',
'Implementation-Version': version,
'Main-Class': 'co.llective.hyena.util.ParseMsgKt'
}
baseName = project.name + '-parsemsg'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}