78 lines
1.7 KiB
Groovy
78 lines
1.7 KiB
Groovy
/*
|
|
Запуск
|
|
gradle run
|
|
*/
|
|
|
|
import ru.dmitriymx.gradle.plugin.LibsPlugin
|
|
|
|
class Logic {
|
|
private final Project project
|
|
|
|
Logic(Project project) {
|
|
this.project = project
|
|
}
|
|
|
|
String getProperty1(String propertyName1, String propertyName2) {
|
|
return (String) (project.hasProperty(propertyName1) ? project.property(propertyName1) : project.property(propertyName2))
|
|
}
|
|
|
|
String getProperty1(String propertyName) {
|
|
return (String) (project.hasProperty(propertyName) ? project.property(propertyName) : null)
|
|
}
|
|
}
|
|
|
|
plugins {
|
|
id 'java'
|
|
id 'application'
|
|
}
|
|
|
|
apply plugin: LibsPlugin
|
|
|
|
def logic = new Logic(project)
|
|
|
|
project.group = logic.getProperty1('project.group')
|
|
project.version = logic.getProperty1('project.version')
|
|
jar.archiveBaseName.set(logic.getProperty1('project.name'))
|
|
|
|
compileJava {
|
|
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_11
|
|
options.encoding = 'UTF-8'
|
|
}
|
|
|
|
repositories {
|
|
mavenLocal()
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
annotationProcessor libs.lombok
|
|
compileOnly libs.lombok
|
|
compileOnly libs.annotations
|
|
|
|
implementation libs.logger.slf4j
|
|
implementation libs.logger.logback
|
|
|
|
implementation libs.dagger2.implementation
|
|
annotationProcessor libs.dagger2.annotationProcessor
|
|
|
|
implementation platform('io.projectreactor:reactor-bom:2020.0.6')
|
|
implementation 'io.projectreactor:reactor-core'
|
|
|
|
implementation 'io.netty:netty-all:4.1.22.Final'
|
|
implementation libs.guava
|
|
|
|
testImplementation libs.junit5.api
|
|
testImplementation libs.junit5.params
|
|
testRuntimeOnly libs.junit5.engine
|
|
|
|
testImplementation libs.lang3
|
|
}
|
|
|
|
application {
|
|
mainClassName = 'mc.server.Main'
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
}
|