-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
73 lines (62 loc) · 1.9 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
plugins {
id "org.jetbrains.kotlin.jvm" version "1.3.31"
id 'com.github.johnrengelman.shadow' version '2.0.4'
}
apply plugin: 'java'
apply plugin: 'kotlin'
//Defines what version of Java to use.
sourceCompatibility = 1.8
//Defines how Kotlin should compile.
compileKotlin {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
kotlinOptions {
//Defines what jvm bytecode to use, 1.8 rather than 1.6
jvmTarget = "1.8"
apiVersion = "1.3"
languageVersion = "1.3"
}
}
//Defines how Kotlin should compile when testingTry to keep it the same as compileKotlin.
compileTestKotlin {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
kotlinOptions {
//Defines what jvm bytecode to use, 1.8 rather than 1.6
jvmTarget = "1.8"
apiVersion = "1.3"
languageVersion = "1.3"
}
}
repositories {
mavenLocal()
mavenCentral()
maven { url "https://s3-eu-west-1.amazonaws.com/furhat-maven/releases"}
maven { url 'https://repo.gradle.org/gradle/libs-releases' }
}
dependencies {
compile 'com.furhatrobotics.furhatos:furhat-commons:+'
}
//These new blocks are needed to package your project into a working skill file.
jar {
def lowerCasedName = baseName.toLowerCase()
def normalizedName = lowerCasedName.substring(0,1).toUpperCase() + lowerCasedName.substring(1)
manifest.attributes(
'Class-Path': configurations.compile.collect { it.getName() }.join(' '),
'Main-Class': "furhatos.app.${lowerCasedName}.${normalizedName}Skill"
)
}
shadowJar {
manifest {
exclude '**/Log4j2Plugins.dat'
exclude '**/node_modules'
}
from "skill.properties"
from "assets"
extension 'skill'
Properties properties = new Properties()
properties.load(project.file('skill.properties').newDataInputStream())
def version = properties.getProperty('version')
def name = properties.getProperty('name')
archiveName = "${name}_${version}.skill"
}