-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
96 lines (82 loc) · 2.37 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
import com.virgo47.gradle.cpjar.util.ManifestUtil
buildscript {
repositories {
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath ("com.netflix.nebula:nebula-clojure-plugin:9.2.0") {
exclude group:"org.codehaus.groovy", module:"groovy"
}
classpath 'com.github.ben-manes:gradle-versions-plugin:0.27.0'
classpath "gradle.plugin.com.virgo47.gradle:ClasspathJar:1.0.0"
}
}
apply plugin: 'nebula.clojure'
apply plugin: 'com.github.ben-manes.versions'
group = 'org.nn'
sourceSets {
main {
java {
srcDir 'src/main/clojure'
}
resources {
srcDir 'src/main/resources'
}
}
test {
java {
srcDir 'src/test/clojure'
}
resources {
srcDir 'src/test/resources'
}
}
}
repositories {
jcenter()
mavenCentral()
maven { url 'https://clojars.org/repo' }
}
dependencies {
implementation 'org.clojure:clojure:1.10.1'
implementation 'net.mikera:core.matrix:0.62.0'
implementation 'net.mikera:vectorz-clj:0.48.0'
testImplementation 'org.clojure:test.check:0.10.0'
}
compileClojure {
def cpJarFile = new File(new File(project.buildDir, "cpjars"), "main_ClasspathJar.jar")
cpJarFile.delete()
ManifestUtil.prepareClasspathJar(cpJarFile, sourceSets.main.compileClasspath)
classpath = cpJarFile
warnOnReflection = true
aotCompile = true
destinationDir = sourceSets.main.output.classesDirs.files.find {
it.path.contains('clojure') || it.path.contains('java')
}
}
clojureTest {
def cpJarFile = new File(new File(project.buildDir, "cpjars"), "test_ClasspathJar.jar")
cpJarFile.delete()
ManifestUtil.prepareClasspathJar(cpJarFile,
sourceSets.test.runtimeClasspath
+ sourceSets.main.compileClasspath
+ files(sourceSets.main.java.srcDirs,
sourceSets.main.resources.srcDirs,
sourceSets.test.resources.srcDirs))
classpath = cpJarFile
outputDir = new File(project.buildDir, "test")
jvmOptions = {
["-Xmx2048m", "-Dclojure.spec.skip-macros=true", "-Dclojure.compiler.direct-linking=true"]
}
}
uploadArchives {
repositories {
mavenLocal()
}
}
wrapper {
gradleVersion = '5.6.4'
}