mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-12-01 07:03:43 +01:00
89 lines
2.9 KiB
Groovy
89 lines
2.9 KiB
Groovy
import net.fabricmc.loom.task.RemapJarTask
|
|
|
|
plugins {
|
|
id 'com.github.johnrengelman.shadow' version '7.0.0'
|
|
id 'fabric-loom' version '0.12.+'
|
|
}
|
|
|
|
archivesBaseName = 'luckperms'
|
|
|
|
repositories {
|
|
maven { url 'https://maven.fabricmc.net/' }
|
|
mavenLocal()
|
|
}
|
|
|
|
dependencies {
|
|
// https://modmuss50.me/fabric.html
|
|
minecraft 'com.mojang:minecraft:1.19.2'
|
|
mappings 'net.fabricmc:yarn:1.19.2+build.9:v2'
|
|
modImplementation 'net.fabricmc:fabric-loader:0.14.9'
|
|
|
|
Set<String> apiModules = [
|
|
'fabric-api-base',
|
|
'fabric-command-api-v2',
|
|
'fabric-lifecycle-events-v1',
|
|
'fabric-networking-api-v1'
|
|
]
|
|
|
|
apiModules.forEach {
|
|
modImplementation(fabricApi.module(it, '0.60.0+1.19.2'))
|
|
}
|
|
|
|
include(modImplementation('me.lucko:fabric-permissions-api:0.2-SNAPSHOT'))
|
|
|
|
implementation project(':common')
|
|
}
|
|
|
|
processResources {
|
|
inputs.property 'version', project.ext.fullVersion
|
|
filesMatching('**/fabric.mod.json') {
|
|
expand 'version': project.ext.fullVersion
|
|
}
|
|
}
|
|
|
|
shadowJar {
|
|
archiveFileName = "luckpermsfabric-${project.ext.fullVersion}-dev.jar"
|
|
|
|
dependencies {
|
|
exclude('net.fabricmc:.*')
|
|
include(dependency('net.luckperms:.*'))
|
|
include(dependency('me.lucko.luckperms:.*'))
|
|
// We don't want to include the mappings in the jar do we?
|
|
exclude '/mappings/*'
|
|
}
|
|
|
|
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 'io.nats.client', 'me.lucko.luckperms.lib.nats'
|
|
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'
|
|
relocate 'org.yaml.snakeyaml', 'me.lucko.luckperms.lib.yaml'
|
|
}
|
|
|
|
task remappedShadowJar(type: RemapJarTask) {
|
|
dependsOn tasks.shadowJar
|
|
input.set(tasks.shadowJar.archiveFile)
|
|
addNestedDependencies.set(true)
|
|
archiveFileName = "LuckPerms-Fabric-${project.ext.fullVersion}.jar"
|
|
}
|
|
|
|
tasks.assemble.dependsOn tasks.remappedShadowJar
|
|
|
|
artifacts {
|
|
archives remappedShadowJar
|
|
shadow shadowJar
|
|
}
|