-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle
144 lines (129 loc) · 4.69 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
plugins {
id 'java'
id 'maven-publish'
id 'org.javamodularity.moduleplugin' version '1.8.3' apply false
id 'net.minecraftforge.gradleutils' version '2.3.5'
}
import net.minecraftforge.gradleutils.PomUtils
import org.kettingpowered.task.GenerateLibs
import org.kettingpowered.task.Util
import java.util.stream.Collectors
Util.init()
group = 'org.kettingpowered'
version = System.getenv("VERSION") ?: 'dev-env'
repositories {
mavenCentral()
maven { url = 'https://nexus.c0d3m4513r.com/Ketting/' }
maven { url = 'https://nexus.c0d3m4513r.com/Forge/' }
maven { url = 'https://repo.kettingpowered.org/Ketting' }
maven { url = 'https://repo.kettingpowered.org/Forge' }
// mavenLocal()
}
java {
toolchain.languageVersion = JavaLanguageVersion.of(17)
withSourcesJar()
}
configurations {
implementation {
canBeResolved = true
}
}
dependencies {
compileOnly 'org.jetbrains:annotations:24.0.0'
implementation 'org.kettingpowered:kettingcommon:2.4.1'
implementation 'com.google.code.gson:gson:2.10.1' //Used in Patcher
implementation 'me.tongfei:progressbar:0.10.0' //Used to display progress
implementation 'org.kettingpowered:terminal-colors:1.0.2' //Used for progress bar, and terminal colors
implementation 'org.apache.logging.log4j:log4j-api:2.19.0'
implementation 'org.apache.logging.log4j:log4j-core:2.19.0'
implementation 'org.apache.logging.log4j:log4j-slf4j-impl:2.19.0'
implementation 'com.google.code.gson:gson:2.10.1'
//Used in Processors
implementation 'net.minecraftforge:binarypatcher:1.2.0:fatjar'
implementation 'net.minecraftforge:installertools:1.4.3'
implementation 'net.minecraftforge:jarsplitter:1.1.4'
implementation 'net.minecraftforge:ForgeAutoRenamingTool:1.0.6'
implementation 'org.jetbrains:annotations:24.0.0'
}
ext{
mainClass = 'org.kettingpowered.launcher.Main'
}
tasks.register('generateKettingLauncherLibraries', GenerateLibs) {
configuration = 'implementation'
}
jar{
dependsOn generateKettingLauncherLibraries
mustRunAfter generateKettingLauncherLibraries
from(generateKettingLauncherLibraries.output) {
rename {
"data/launcher_libraries.txt"
}
}
manifest{
attributes 'Main-Class': mainClass
attributes 'Launcher-Agent-Class': mainClass
attributes 'Premain-Class': mainClass
attributes 'Automatic-Module-Name': 'org.kettingpowered.kettinglauncher'
attributes([
"Specification-Title": "Kettingpowered",
"Specification-Vendor": "Kettingpowered",
"Implementation-Title": "Ketting",
"Implementation-Version": version,
"Implementation-Vendor": "Kettingpowered",
], "org/kettingpowered/launcher/")
}
}
publishing {
publications.register('mavenJava', MavenPublication).configure {
from components.java
artifact source: generateKettingLauncherLibraries.output, classifier: 'libraries'
artifactId = 'kettinglauncher'
pom {
name = project.name
description = 'Launcher for the Ketting server'
url = "https://github.com/kettingpowered/kettinglauncher"
developers {
developer {
id = "justred23"
name = "JustRed23"
}
developer {
id = "c0d3m4513r"
name = "C0D3 M4513R"
}
}
scm {
connection = "scm:git:https://github.com/kettingpowered/kettinglauncher.git"
//developerConnection = "scm:svn:https://subversion.example.com/svn/project/trunk/"
url = "https://github.com/kettingpowered/kettinglauncher"
}
PomUtils.setGitHubDetails(pom, 'kettingpowered', 'kettinglauncher')
}
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/kettingpowered/kettinglauncher")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
maven {
name = 'kettingRepo'
credentials {
username = System.getenv("KETTINGUSERNAME")
password = System.getenv("KETTINGPASSWORD")
}
url = "https://reposilite.c0d3m4513r.com/Ketting/"
}
maven {
name = 'kettingRepo-backup'
credentials {
username = System.getenv("KETTINGUSERNAME")
password = System.getenv("KETTINGPASSWORD")
}
url = "https://repo.kettingpowered.org/Ketting/"
}
}
}