forked from xjboss/KCauldronX
Generate old-style server stub for bundle
This commit is contained in:
parent
896e45556a
commit
6149fc0c35
2
.gitmodules
vendored
2
.gitmodules
vendored
@ -3,5 +3,5 @@
|
|||||||
url = https://gitlab.prok.pw/Prototik/KCauldron-Bukkit.git
|
url = https://gitlab.prok.pw/Prototik/KCauldron-Bukkit.git
|
||||||
[submodule "forge"]
|
[submodule "forge"]
|
||||||
path = forge
|
path = forge
|
||||||
url = https://github.com/MinecraftForge/MinecraftForge.git
|
url = https://gitlab.prok.pw/Mirrors/minecraftforge.git
|
||||||
branch = 1.7.10
|
branch = 1.7.10
|
||||||
|
20
build.gradle
20
build.gradle
@ -113,7 +113,7 @@ configurations {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
bootstrap 'pw.prok:KBootstrap:0.0.10+'
|
bootstrap 'pw.prok:KBootstrap:0.1.+'
|
||||||
|
|
||||||
libraries 'net.minecraft:launchwrapper:1.12@jar'
|
libraries 'net.minecraft:launchwrapper:1.12@jar'
|
||||||
libraries 'org.ow2.asm:asm-all:5.0.3'
|
libraries 'org.ow2.asm:asm-all:5.0.3'
|
||||||
@ -211,6 +211,14 @@ task packageChangelog(type: CreateChangelog) {
|
|||||||
version = project.version
|
version = project.version
|
||||||
}
|
}
|
||||||
|
|
||||||
|
task bundleStub(type: Jar) {
|
||||||
|
classifier = 'stub'
|
||||||
|
manifest.attributes([
|
||||||
|
'Main-Class': 'cpw.mods.fml.relauncher.ServerLaunchWrapper',
|
||||||
|
'Class-Path': "bin/${project.group.replace('.', '/')}/${project.name}/${project.version}/${project.name}-${project.version}.jar"
|
||||||
|
])
|
||||||
|
}
|
||||||
|
|
||||||
task installBundle(type: InstallBundle, dependsOn: jar) {
|
task installBundle(type: InstallBundle, dependsOn: jar) {
|
||||||
serverJar tasks.jar.archivePath
|
serverJar tasks.jar.archivePath
|
||||||
bootstrapClasspath configurations.bootstrap
|
bootstrapClasspath configurations.bootstrap
|
||||||
@ -220,6 +228,8 @@ task installBundle(type: InstallBundle, dependsOn: jar) {
|
|||||||
task packageBundle(type: Zip, dependsOn: installBundle) {
|
task packageBundle(type: Zip, dependsOn: installBundle) {
|
||||||
classifier = 'bundle'
|
classifier = 'bundle'
|
||||||
from fileTree(installBundle.installLocation)
|
from fileTree(installBundle.installLocation)
|
||||||
|
from bundleStub
|
||||||
|
rename bundleStub.archiveName, 'KCauldron.jar'
|
||||||
}
|
}
|
||||||
|
|
||||||
task signJars(type: Sign, dependsOn: [packageUniversal, packageChangelog, packageBundle, jar, 'generatePomFileForMavenPublication']) {
|
task signJars(type: Sign, dependsOn: [packageUniversal, packageChangelog, packageBundle, jar, 'generatePomFileForMavenPublication']) {
|
||||||
@ -308,10 +318,16 @@ repositories {
|
|||||||
dependencies {
|
dependencies {
|
||||||
''')
|
''')
|
||||||
configurations.libraries.resolvedConfiguration.resolvedArtifacts.collect { it.moduleVersion.id }.each { module ->
|
configurations.libraries.resolvedConfiguration.resolvedArtifacts.collect { it.moduleVersion.id }.each { module ->
|
||||||
if (['net.minecraft:server:', 'org.ow2.asm:asm-all'].findAll {(module as String).startsWith it}.size() > 0) {
|
if (['net.minecraft:server:', 'org.ow2.asm:asm-all'].findAll { (module as String).startsWith it }.size() > 0) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
file.append(" compile '${module}'\n")
|
file.append(" compile '${module}'\n")
|
||||||
}
|
}
|
||||||
file.append('}')
|
file.append('}')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
task resolveAllDependencies {
|
||||||
|
doLast {
|
||||||
|
configurations.each { it.resolve() }
|
||||||
|
}
|
||||||
|
}
|
@ -47,6 +47,8 @@ If you want use easier & safer method please read about KBootstrap at https://pr
|
|||||||
java -jar '''
|
java -jar '''
|
||||||
it << jarPath
|
it << jarPath
|
||||||
it << '''
|
it << '''
|
||||||
|
... or
|
||||||
|
java -jar KCauldron.jar
|
||||||
3. That's end, enjoy
|
3. That's end, enjoy
|
||||||
|
|
||||||
# Why I should use KBootstrap?
|
# Why I should use KBootstrap?
|
||||||
|
Loading…
Reference in New Issue
Block a user