Files
ZoteCoreLoader/build.gradle
T
Reider745 64dec748d0 added files
added files
2023-11-10 11:13:53 +03:00

71 lines
1.5 KiB
Groovy

apply plugin: 'java'
apply plugin: 'application'
repositories {
mavenCentral()
jcenter()
maven {
url "https://repo.lanink.cn/repository/maven-public/"
}
maven {
url "https://repo.opencollab.dev/maven-releases/"
}
maven {
url 'https://repo.opencollab.dev/maven-snapshots'
}
}
dependencies {
// https://mvnrepository.com/artifact/com.google.code.gson/gson
implementation group: 'com.google.code.gson', name: 'gson', version: '2.7'
implementation fileTree(dir: 'iclibs', include: ['*.jar'])
implementation 'org.json:json:20231013'
implementation files('target/Nukkit-MOT-SNAPSHOT.jar')
}
mainClassName = 'com.reider745.Main'
def targetJavaVersion = 17
java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
}
withSourcesJar()
}
jar {
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
exclude('META_INF/**')
}
manifest {
attributes(
'Main-Class': 'com.reider745.Main'
)
}
}
sourceSets.main {
java.srcDirs = ['src/main/java']
resources.srcDirs = ['src/main/resources']
}
//tasks createJar() {
// manifest {
// attributes 'Main-Class': 'com.reider745.Main'
// }
//
// from(sourceSets.main.output) {
// include '**/*'
// }
// with jar
//}