Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,4 @@ fabric.properties
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
fundiscordbot.iml
./.idea/*
98 changes: 98 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
import org.apache.tools.ant.filters.ReplaceTokens

plugins {
id 'java'
id 'maven-publish'
id 'com.github.johnrengelman.shadow' version '4.0.2'
}

group = 'de.devgruppe'
version = '0.0.1'
description = 'FunDiscordBot'
sourceCompatibility = 1.8
targetCompatibility = 1.8

repositories {
mavenLocal()
mavenCentral()
maven {
url = 'http://jcenter.bintray.com'
}

maven {
url = 'http://repo.maven.apache.org/maven2'
}
}

dependencies {
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.13.0'
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.13.0'

compile 'net.dv8tion:JDA:3.4.0_317'
compile 'com.google.code.gson:gson:2.8.5'
compile 'commons-io:commons-io:2.5'

compileOnly 'org.projectlombok:lombok:1.18.10'
annotationProcessor 'org.projectlombok:lombok:1.18.10'
}

task sourcesForRelease(type: Copy) {
from 'src/main/java'
into 'build/filteredSrc'
filter(ReplaceTokens, tokens: [VERSION: version, DATE: getBuildDate(), TIME: getBuildTime()])
}

static def getBuildDate() {
return new Date().format('yyyy/MM/dd')
}

static def getBuildTime() {
return new Date().format('HH:mm:ss')
}

compileJava {
options.encoding = 'UTF-8'
source = sourcesForRelease.destinationDir
classpath = sourceSets.main.compileClasspath
dependsOn sourcesForRelease
}

task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from "${buildDir}/filteredSrc"
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}

javadoc {
options.encoding = 'UTF-8'
if (JavaVersion.current().java9Compatible) {
afterEvaluate {
options.addBooleanOption("html5", true)
}
}
}

jar {
baseName = project.name
}

shadowJar {
classifier = 'withDependencies'
}

build {
dependsOn clean
dependsOn jar
//dependsOn javadocJar
dependsOn sourcesJar
dependsOn shadowJar

jar.mustRunAfter clean
javadocJar.mustRunAfter jar
//sourcesJar.mustRunAfter javadocJar
shadowJar.mustRunAfter sourcesJar
}
11 changes: 11 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#Enable daemon
org.gradle.daemon=true

# Try and findout the best heap size for your project build.
org.gradle.jvmargs=-Xmx3096m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8

# Modularise your project and enable parallel build
org.gradle.parallel=true

# Enable configure on demand.
org.gradle.configureondemand=true
6 changes: 6 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Fri Oct 04 15:17:45 CEST 2019
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
188 changes: 188 additions & 0 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading