mirror of
https://github.com/mii443/ChatGPTBot.git
synced 2025-08-22 15:05:26 +00:00
58 lines
1.5 KiB
Groovy
58 lines
1.5 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id 'com.github.johnrengelman.shadow' version '6.0.0'
|
|
}
|
|
|
|
group = 'codes.mii'
|
|
version = '1.0-SNAPSHOT'
|
|
compileJava.options.encoding = 'UTF-8'
|
|
compileTestJava.options.encoding = 'UTF-8'
|
|
javadoc.options.encoding = 'UTF-8'
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven {
|
|
name = "spigotmc-repo"
|
|
url = "https://hub.spigotmc.org/nexus/content/repositories/snapshots/"
|
|
}
|
|
maven {
|
|
name = "sonatype"
|
|
url = "https://oss.sonatype.org/content/groups/public/"
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
compileOnly "org.spigotmc:spigot-api:1.19.3-R0.1-SNAPSHOT"
|
|
implementation 'com.theokanning.openai-gpt3-java:service:0.11.0'
|
|
implementation 'com.google.code.gson:gson:2.10.1'
|
|
}
|
|
|
|
def targetJavaVersion = 17
|
|
java {
|
|
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
|
|
sourceCompatibility = javaVersion
|
|
targetCompatibility = javaVersion
|
|
if (JavaVersion.current() < javaVersion) {
|
|
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
|
|
}
|
|
}
|
|
|
|
tasks.withType(JavaCompile).configureEach {
|
|
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
|
|
options.release = targetJavaVersion
|
|
}
|
|
}
|
|
|
|
processResources {
|
|
def props = [version: version]
|
|
inputs.properties props
|
|
filteringCharset 'UTF-8'
|
|
filesMatching('plugin.yml') {
|
|
expand props
|
|
}
|
|
}
|
|
|
|
shadowJar {
|
|
project.configurations.implementation.canBeResolved = true
|
|
configurations = [project.configurations.implementation]
|
|
} |