forked from tenbergen/anki-drive-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
87 lines (70 loc) · 2.24 KB
/
build.gradle
File metadata and controls
87 lines (70 loc) · 2.24 KB
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
buildscript {
repositories {
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
}
plugins {
id "com.moowork.node" version "1.3.1"
id 'java-library'
}
apply plugin: 'java-library'
apply plugin: 'maven'
apply plugin: 'com.moowork.node'
group = 'com.github.tenbergen'
compileJava.options.fork = true
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
repositories {
jcenter()
}
dependencies {
//included by adessoAG/anki-drive-java, but maybe updated
compile 'org.reflections:reflections:0.9.11' //was 0.9.10
compile 'javax.xml.bind:jaxb-api:2.3.0'
//new dependencies included by BT
//dependencies for AnkiCommander (https://github.com/sha224/anki-commander)
implementation 'org.apache.sshd:sshd-core:2.2.0'
implementation 'org.jline:jline:3.10.0'
implementation 'org.slf4j:slf4j-api:1.7.26'
implementation 'org.slf4j:slf4j-simple:1.7.26'
}
node {
version = '8.12.0' //was '4.4.7'
npmVersion = '6.4.1' //was '3.10.5'
distBaseUrl = 'https://nodejs.org/dist'
download = true
workDir = file("${project.buildDir}/nodejs")
nodeModulesDir = file("${project.projectDir}")
}
task fatJar(type: Jar) {
baseName = project.name + '-all'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
task server(type: NodeTask, dependsOn: npmInstall) {
script = file('src/main/nodejs/server.js')
ignoreExitValue = true
}
//added exec task for Anki Commander SSH test server
task ssh(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
main = 'com.shakhar.anki.commander.AnkiSshd'
}
//added exec task for AnkiConnection test program
task ankiConnectionTest(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
main = 'edu.oswego.cs.CPSLab.AnkiConnectionTest'
}
//added exec task for RoadmapScanner test program
task scanTrack(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
main = 'edu.oswego.cs.CPSLab.RoadmapScannerTest'
}
//processResources.dependsOn(['npmInstall']) // moved to server task because only that needs node. Fixed Jitpack issues.