71 lines
1.9 KiB
Groovy
71 lines
1.9 KiB
Groovy
plugins {
|
|
id 'org.jetbrains.kotlin.jvm' version '1.8.21'
|
|
id 'com.github.johnrengelman.shadow' version '6.1.0'
|
|
}
|
|
|
|
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.8"
|
|
languageVersion = "1.8"
|
|
}
|
|
}
|
|
|
|
//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.8"
|
|
languageVersion = "1.8"
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
mavenLocal()
|
|
mavenCentral()
|
|
maven { url "https://s3-eu-west-1.amazonaws.com/furhat-maven/releases"}
|
|
maven { url 'https://repo.gradle.org/gradle/libs-releases' }
|
|
maven { url { "https://repo1.maven.org/maven2/" } }
|
|
}
|
|
|
|
|
|
dependencies {
|
|
implementation 'com.furhatrobotics.furhatos:furhat-commons:2.9.0'
|
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3"
|
|
}
|
|
|
|
jar {
|
|
def lowerCasedName = baseName.toLowerCase()
|
|
def normalizedName = lowerCasedName.substring(0,1).toUpperCase() + lowerCasedName.substring(1)
|
|
manifest.attributes(
|
|
'Class-Path': configurations.compileClasspath.collect { it.getName() }.join(' '),
|
|
'Main-Class': "furhatos.app.${lowerCasedName}.${normalizedName}Skill"
|
|
)
|
|
}
|
|
|
|
//ShadowJar depends on jar being finished properly.
|
|
shadowJar {
|
|
manifest {
|
|
exclude '**/Log4j2Plugins.dat'
|
|
exclude '**/node_modules'
|
|
}
|
|
from "skill.properties"
|
|
from "assets"
|
|
extension 'skill'
|
|
}
|