Пытаюсь импортировать Viaversion, но все равно не получается. Помогите пожалуйста
Код:
plugins {
id 'java'
}
group = 'org.example.h0ng'
version = '1.0'
repositories {
maven("https://repo.viaversion.com") // Добавлено для Viaversion
}
dependencies {
compileOnly "com.destroystokyo.paper:paper-api:1.16.5-R0.1-SNAPSHOT"
compileOnly("com.viaversion:viaversion-api:5.10") // Замените VERSION на актуальную версию
implementation "io.netty:netty-all:4.1.68.Final" // Добавлено для io.netty.channel.Channel
}
def targetJavaVersion = 8
java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
options.release.set(targetJavaVersion)
}
}
processResources {
def props = [version: version]
inputs.properties props
filteringCharset 'UTF-8'
filesMatching('plugin.yml') {
expand props
}
}