This repository has been archived by the owner on Jun 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
117 lines (110 loc) · 3.16 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
buildscript {
repositories {
gradlePluginPortal()
}
dependencies {
classpath 'gradle.plugin.com.github.jengelman.gradle.plugins:shadow:7.0.0'
}
}
plugins {
id 'java'
id 'maven-publish'
id "com.github.onslip.gradle-one-jar" version "1.0.6"
id 'com.github.johnrengelman.shadow' version '5.1.0'
}
apply plugin: 'java'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'idea'
repositories {
mavenLocal()
maven {
url = uri('https://repo.maven.apache.org/maven2/')
}
flatDir {
dirs 'libs' // ./libs directory
}
maven {
url = "https://repo.zenoc.net/repository"
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar']) // this should include the deobf jar
// implementation 'glucose:minecraft-server:1.16.5-SNAPSHOT' // Moved to libs dir (uhh, yay maven?)
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'org.apache.logging.log4j:log4j-core:2.13.2'
implementation 'org.apache.logging.log4j:log4j-iostreams:2.8.1'
implementation 'net.minecrell:terminalconsoleappender:1.2.0'
implementation 'commons-io:commons-io:2.9.0'
implementation 'org.jetbrains:annotations:16.0.2'
implementation 'net.sf.jopt-simple:jopt-simple:5.0.4'
implementation 'ml.glucosedev:GlucoseLib:1.0.7-BETA'
// implementation 'glucose.GlucoseLib:GlucoseLib-1.0.4-BETA-gradle'
implementation 'net.kyori:adventure-api:4.2.0'
implementation 'net.kyori:adventure-text-serializer-gson:4.2.0'
runtimeOnly 'org.jline:jline-terminal-jansi:3.12.1'
implementation 'jline:jline:2.9'
// runtimeOnly 'org.apache.logging.log4j:log4j-slf4j-impl:2.8.1'
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.14.1'
runtimeOnly 'com.lmax:disruptor:3.4.2'
// implementation 'ml.glucosedev:GlucoseLib:1.0.5-BETA'
}
group = 'ml.glucosedev'
version = '1.17.1-015'
description = 'Glucose'
sourceCompatibility = JavaVersion.VERSION_16
targetCompatibility = JavaVersion.VERSION_16
publishing {
publications {
maven(MavenPublication) {
from(components.java)
}
}
}
var mainClass="ml.glucosedev.glucose.Main"
jar {
manifest {
attributes "Main-Class": "$mainClass"
}
// from {
// configurations.collect { it.isDirectory() ? it : zipTree(it) }
// }
}
// from {
// configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
// }
task setup(type: Exec) {
group 'glucose'
commandLine 'git submodule update --init --recursive'
commandLine './gradlew build -p GlucoseLib'
commandLine 'cp GlucoseLib/build/libs/GlucoseLib-*.jar ./libs/'
dependsOn ':decompile'
dependsOn ':patch'
}
task decompile(type: Exec) {
group "glucose"
commandLine './glucose', 'd'
}
task patch(type: Exec) {
group "glucose"
commandLine './glucose', 'p'
}
task rebuildPatches(type: Exec) {
group "glucose"
commandLine './glucose', 'rbp'
}
/*
task make(type: Exec, Jar) {
decompile
patch
// build
fatJar
}
*/
shadowJar {
manifest {
attributes 'Multi-Release': 'true'
}
}
artifacts {
archives(tasks.shadowJar)
}