Skip to content

Commit 13c1524

Browse files
authored
Merge pull request #20 from Dev-Gruppe/dev
Merge
2 parents 9133ed6 + 85ab59f commit 13c1524

22 files changed

+957
-171
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,4 @@ fabric.properties
8383
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
8484
hs_err_pid*
8585
fundiscordbot.iml
86+
./.idea/*

build.gradle

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
import org.apache.tools.ant.filters.ReplaceTokens
2+
3+
plugins {
4+
id 'java'
5+
id 'maven-publish'
6+
id 'com.github.johnrengelman.shadow' version '4.0.2'
7+
}
8+
9+
group = 'de.devgruppe'
10+
version = '0.0.1'
11+
description = 'FunDiscordBot'
12+
sourceCompatibility = 1.8
13+
targetCompatibility = 1.8
14+
15+
repositories {
16+
mavenLocal()
17+
mavenCentral()
18+
maven {
19+
url = 'http://jcenter.bintray.com'
20+
}
21+
22+
maven {
23+
url = 'http://repo.maven.apache.org/maven2'
24+
}
25+
}
26+
27+
dependencies {
28+
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.13.0'
29+
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.13.0'
30+
31+
compile 'net.dv8tion:JDA:3.4.0_317'
32+
compile 'com.google.code.gson:gson:2.8.5'
33+
compile 'commons-io:commons-io:2.5'
34+
35+
compileOnly 'org.projectlombok:lombok:1.18.10'
36+
annotationProcessor 'org.projectlombok:lombok:1.18.10'
37+
}
38+
39+
task sourcesForRelease(type: Copy) {
40+
from 'src/main/java'
41+
into 'build/filteredSrc'
42+
filter(ReplaceTokens, tokens: [VERSION: version, DATE: getBuildDate(), TIME: getBuildTime()])
43+
}
44+
45+
static def getBuildDate() {
46+
return new Date().format('yyyy/MM/dd')
47+
}
48+
49+
static def getBuildTime() {
50+
return new Date().format('HH:mm:ss')
51+
}
52+
53+
compileJava {
54+
options.encoding = 'UTF-8'
55+
source = sourcesForRelease.destinationDir
56+
classpath = sourceSets.main.compileClasspath
57+
dependsOn sourcesForRelease
58+
}
59+
60+
task sourcesJar(type: Jar, dependsOn: classes) {
61+
classifier = 'sources'
62+
from "${buildDir}/filteredSrc"
63+
}
64+
65+
task javadocJar(type: Jar, dependsOn: javadoc) {
66+
classifier = 'javadoc'
67+
from javadoc.destinationDir
68+
}
69+
70+
javadoc {
71+
options.encoding = 'UTF-8'
72+
if (JavaVersion.current().java9Compatible) {
73+
afterEvaluate {
74+
options.addBooleanOption("html5", true)
75+
}
76+
}
77+
}
78+
79+
jar {
80+
baseName = project.name
81+
}
82+
83+
shadowJar {
84+
classifier = 'withDependencies'
85+
}
86+
87+
build {
88+
dependsOn clean
89+
dependsOn jar
90+
//dependsOn javadocJar
91+
dependsOn sourcesJar
92+
dependsOn shadowJar
93+
94+
jar.mustRunAfter clean
95+
javadocJar.mustRunAfter jar
96+
//sourcesJar.mustRunAfter javadocJar
97+
shadowJar.mustRunAfter sourcesJar
98+
}

gradle.properties

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#Enable daemon
2+
org.gradle.daemon=true
3+
4+
# Try and findout the best heap size for your project build.
5+
org.gradle.jvmargs=-Xmx3096m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
6+
7+
# Modularise your project and enable parallel build
8+
org.gradle.parallel=true
9+
10+
# Enable configure on demand.
11+
org.gradle.configureondemand=true
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Fri Oct 04 15:17:45 CEST 2019
2+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
3+
distributionBase=GRADLE_USER_HOME
4+
distributionPath=wrapper/dists
5+
zipStorePath=wrapper/dists
6+
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 188 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)