MittweidaForFuture/build.gradle

51 lines
1.2 KiB
Groovy

plugins {
id 'java'
id 'application'
}
group 'BOTS'
version '1.0.0'
sourceCompatibility = 1.8
mainClassName = 'Main'
def jsonsimpleVersion = '1.1.1'
def telegramBotsVersion = '4.3.1'
def self4JVersion = '1.7.28'
def log4jVersion = '2.12.1'
repositories {
jcenter()
}
dependencies {
compile group: 'com.googlecode.json-simple', name: 'json-simple', version: jsonsimpleVersion
compile group: 'org.telegram', name: 'telegrambots', version: telegramBotsVersion
compile group: 'org.slf4j', name: 'slf4j-api', version: self4JVersion
compile group: 'org.slf4j', name: 'slf4j-log4j12', version: self4JVersion
compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: log4jVersion
}
apply plugin: 'java'
compileJava.options.encoding = 'UTF-8'
//create a single Jar with all dependencies
task fatJar(type: Jar) {
manifest {
attributes 'BOT': 'MittweidaForFuture2',
'Implementation-Version': version,
'Main-Class': mainClassName
}
baseName = project.name + '-all'
from {
configurations
.compile
.findAll { !it.name.endsWith('pom') }
.collect { it.isDirectory() ? it : zipTree(it) }
}
with jar
}