Fix bukkit legacy 1.7 build
This commit is contained in:
parent
75d8f00400
commit
3c4091018c
|
@ -3,13 +3,13 @@ plugins {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
compile project(path: ':bukkit:loader', configuration: 'shadow')
|
||||
compile project(':bukkit')
|
||||
compile 'com.google.code.gson:gson:2.7'
|
||||
compile 'com.google.guava:guava:19.0'
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
archiveName = "LuckPerms-Bukkit-Legacy-${project.ext.fullVersion}.jar"
|
||||
archiveName = 'luckperms-bukkitlegacy.jarinjar'
|
||||
|
||||
dependencies {
|
||||
include(dependency('me.lucko.luckperms:.*'))
|
||||
|
@ -19,6 +19,24 @@ shadowJar {
|
|||
|
||||
relocate 'com.google.common', 'me.lucko.luckperms.lib.guava'
|
||||
relocate 'com.google.gson', 'me.lucko.luckperms.lib.gson'
|
||||
|
||||
relocate 'net.kyori.adventure', 'me.lucko.luckperms.lib.adventure'
|
||||
relocate 'net.kyori.event', 'me.lucko.luckperms.lib.eventbus'
|
||||
relocate 'com.github.benmanes.caffeine', 'me.lucko.luckperms.lib.caffeine'
|
||||
relocate 'okio', 'me.lucko.luckperms.lib.okio'
|
||||
relocate 'okhttp3', 'me.lucko.luckperms.lib.okhttp3'
|
||||
relocate 'net.bytebuddy', 'me.lucko.luckperms.lib.bytebuddy'
|
||||
relocate 'me.lucko.commodore', 'me.lucko.luckperms.lib.commodore'
|
||||
relocate 'org.mariadb.jdbc', 'me.lucko.luckperms.lib.mariadb'
|
||||
relocate 'com.mysql', 'me.lucko.luckperms.lib.mysql'
|
||||
relocate 'org.postgresql', 'me.lucko.luckperms.lib.postgresql'
|
||||
relocate 'com.zaxxer.hikari', 'me.lucko.luckperms.lib.hikari'
|
||||
relocate 'com.mongodb', 'me.lucko.luckperms.lib.mongodb'
|
||||
relocate 'org.bson', 'me.lucko.luckperms.lib.bson'
|
||||
relocate 'redis.clients.jedis', 'me.lucko.luckperms.lib.jedis'
|
||||
relocate 'com.rabbitmq', 'me.lucko.luckperms.lib.rabbitmq'
|
||||
relocate 'org.apache.commons.pool2', 'me.lucko.luckperms.lib.commonspool2'
|
||||
relocate 'ninja.leaping.configurate', 'me.lucko.luckperms.lib.configurate'
|
||||
}
|
||||
|
||||
artifacts {
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
plugins {
|
||||
id 'com.github.johnrengelman.shadow'
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven { url 'https://papermc.io/repo/repository/maven-public/' }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly 'com.destroystokyo.paper:paper-api:1.15.2-R0.1-SNAPSHOT'
|
||||
|
||||
compile project(':api')
|
||||
compile project(':common:loader-utils')
|
||||
}
|
||||
|
||||
processResources {
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
expand 'pluginVersion': project.ext.fullVersion
|
||||
include 'plugin.yml'
|
||||
}
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
archiveName = "LuckPerms-Bukkit-Legacy-${project.ext.fullVersion}.jar"
|
||||
|
||||
from {
|
||||
project(':bukkit-legacy').tasks.shadowJar.archiveFile
|
||||
}
|
||||
}
|
||||
|
||||
artifacts {
|
||||
archives shadowJar
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
* This file is part of LuckPerms, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) lucko (Luck) <luck@lucko.me>
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package me.lucko.luckperms.bukkit.loader;
|
||||
|
||||
import me.lucko.luckperms.common.loader.JarInJarClassLoader;
|
||||
import me.lucko.luckperms.common.loader.LoaderBootstrap;
|
||||
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
public class BukkitLegacyLoaderPlugin extends JavaPlugin {
|
||||
private static final String JAR_NAME = "luckperms-bukkitlegacy.jarinjar";
|
||||
private static final String BOOTSTRAP_CLASS = "me.lucko.luckperms.bukkit.LPBukkitBootstrap";
|
||||
|
||||
private final LoaderBootstrap plugin;
|
||||
|
||||
public BukkitLegacyLoaderPlugin() {
|
||||
JarInJarClassLoader loader = new JarInJarClassLoader(getClass().getClassLoader(), JAR_NAME);
|
||||
this.plugin = loader.instantiatePlugin(BOOTSTRAP_CLASS, JavaPlugin.class, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoad() {
|
||||
this.plugin.onLoad();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
this.plugin.onEnable();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisable() {
|
||||
this.plugin.onDisable();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
name: LuckPerms
|
||||
version: ${pluginVersion}
|
||||
description: A permissions plugin
|
||||
author: Luck
|
||||
website: https://luckperms.net
|
||||
main: me.lucko.luckperms.bukkit.loader.BukkitLegacyLoaderPlugin
|
||||
load: STARTUP
|
||||
|
||||
# Load LuckPerms before Vault. This means that all plugins that (soft-)depend
|
||||
# on Vault depend on LuckPerms too.
|
||||
#
|
||||
# This fixes issues caused by plugins obtaining the Vault service provider instance
|
||||
# only once when they initially enable. (if they haven't depended on LP, our registration
|
||||
# won't be there yet)
|
||||
loadbefore: [Vault]
|
||||
|
||||
# Soft depend on LilyPad for messaging service impl
|
||||
# Soft depend on ViaVersion for adventure protocol facet
|
||||
softdepend: [LilyPad-Connect, ViaVersion]
|
||||
|
||||
commands:
|
||||
luckperms:
|
||||
description: Manage permissions
|
||||
aliases: [lp, perm, perms, permission, permissions]
|
|
@ -17,6 +17,7 @@ include (
|
|||
'bukkit',
|
||||
'bukkit:loader',
|
||||
'bukkit-legacy',
|
||||
'bukkit-legacy:loader',
|
||||
'bungee',
|
||||
'bungee:loader',
|
||||
'fabric',
|
||||
|
|
Loading…
Reference in New Issue