- до настроен проект - теперь не обязательно иметь изначально какие-то файлы в рабочей директории для запуска проекта - исправлена не правильное закрытие сокета
50 lines
1.2 KiB
Groovy
50 lines
1.2 KiB
Groovy
apply plugin: 'java'
|
|
apply plugin: 'application'
|
|
|
|
group 'com.reider745'
|
|
version '1.0-SNAPSHOT'
|
|
mainClassName = 'com.reider745.Main'
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
// https://mvnrepository.com/artifact/com.google.code.gson/gson
|
|
implementation group: 'com.google.code.gson', name: 'gson', version: '2.7'
|
|
|
|
// https://mvnrepository.com/artifact/org.mozilla/rhino
|
|
implementation group: 'org.mozilla', name: 'rhino', version: '1.7.14'
|
|
|
|
implementation fileTree (dir: 'iclibs', include: ['*.jar'])
|
|
implementation 'org.json:json:20231013'
|
|
|
|
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
|
|
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
def targetJavaVersion = 17
|
|
java {
|
|
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
|
|
if (JavaVersion.current() < javaVersion) {
|
|
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
|
|
}
|
|
|
|
withSourcesJar()
|
|
}
|
|
|
|
jar {
|
|
duplicatesStrategy = 'exclude'
|
|
manifest {
|
|
attributes 'Main-Class': mainClassName
|
|
}
|
|
from configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) }
|
|
}
|
|
|
|
run {
|
|
workingDir = 'target'
|
|
} |