-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
133 lines (113 loc) · 4.28 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
group 'ca.mcgill.sus.screensaver'
version '3.3.0'
buildscript {
repositories {
jcenter()
mavenCentral()
maven { url "https://www.jitpack.io" }
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$KOTLIN"
classpath "ca.mcgill.tepid-commons:gradle-plugin:$TEPID_COMMONS"
}
}
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'idea'
apply plugin: 'ca.mcgill.science.tepid.commons'
ext {
// can be passed with -Ptepid_config_dir=CONFIG_DIR, or set in an environment variable "tepid_config_dir
if (! project.hasProperty('tepid_config_dir')){
tepid_config_dir = "$System.env.tepid_config_dir"
}
if (! project.hasProperty('tepid_config_dir')){
throw new GradleException('tepid_config_dir not found')
}
}
sourceCompatibility = JVM_TARGET
targetCompatibility = JVM_TARGET
repositories {
mavenCentral()
maven { url "https://www.jitpack.io" }
}
dependencies {
testCompile "junit:junit:$JUNIT"
testCompile "org.jetbrains.kotlin:kotlin-test-junit:$KOTLIN"
testCompile 'pl.pragmatists:JUnitParams:1.1.1'
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$KOTLIN"
compile "org.jetbrains.kotlin:kotlin-reflect:$KOTLIN"
compile "ca.mcgill.tepid-commons:models:$TEPID_COMMONS"
compile "ca.mcgill.tepid-commons:utils:$TEPID_COMMONS"
compile "ca.mcgill.tepid-commons:retrofit:$TEPID_COMMONS"
compile 'net.sf.biweekly:biweekly:0.6.2'
compile "com.google.code.gson:gson:2.8.5"
compile "org.glassfish.hk2:hk2-api:2.5.0-b62"
compile "org.glassfish.hk2:hk2-locator:2.5.0-b62"
compile group: 'org.glassfish.hk2', name: 'hk2-utils', version: '2.5.0-b62'
compile group: 'org.glassfish.hk2.external', name: 'javax.inject', version: '2.5.0-b62'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.9.7'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.9.7'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.7'
compile group: 'com.fasterxml.jackson.jaxrs', name: 'jackson-jaxrs-base', version: '2.9.7'
compile group: 'com.fasterxml.jackson.jaxrs', name: 'jackson-jaxrs-json-provider', version: '2.9.7'
compile group: 'com.fasterxml.jackson.module', name: 'jackson-module-jaxb-annotations', version: '2.9.7'
compile group: 'org.javatuples', name: 'javatuples', version: '1.2'
compile group: 'javax.annotation', name: 'javax.annotation-api', version: '1.3.2'
compile group: 'javax.ws.rs', name: 'javax.ws.rs-api', version: '2.1.1'
compile group: 'org.glassfish.jersey.core', name: 'jersey-client', version: '2.27'
compile group: 'org.glassfish.jersey.core', name: 'jersey-common', version: '2.27'
compile group: 'org.glassfish.jersey.inject', name: 'jersey-hk2', version: '2.27'
compile group: 'org.glassfish.jersey.ext', name: 'jersey-entity-filtering', version: '2.27'
compile group: 'org.glassfish.jersey.bundles.repackaged', name: 'jersey-guava', version: '2.26-b03'
compile group: 'org.glassfish.jersey.media', name: 'jersey-media-json-jackson', version: '2.27'
compile group: 'com.github.mangstadt', name: 'vinnie', version: '2.0.2'
}
jar.baseName = 'ctfscreen'
sourceSets {
main {
resources {
srcDirs "src/main/resources", "config"
}
}
}
task copyConfigs(type: Copy) {
from "$tepid_config_dir/URL.properties", "$tepid_config_dir/screensaver.properties"
into "config"
}
task copyRunner(type: Copy) {
into "$buildDir/libs"
from "windows"
}
task copyLibs(type: Copy) {
into "$buildDir/libs/ctfscreen-data"
from configurations.runtime
}
task windowsJar(type: Jar) {
from('config') {
include '*.properties'
}
from sourceSets.main.output
destinationDir = file("$buildDir/libs/ctfscreen-data")
baseName = 'ctfscreen'
}
task windows(type: GradleBuild) {
tasks = ['windowsJar', 'copyRunner', 'copyLibs', 'copyConfigs']
group 'build'
}
task msi(type: Exec) {
dependsOn "windows"
workingDir "$buildDir/libs"
environment "PRODUCTVERSION", version
commandLine "cmd","/c","wix.bat"
group 'build'
}
compileKotlin {
kotlinOptions {
jvmTarget = JVM_TARGET
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = JVM_TARGET
}
}