LuckPerms/fabric/build.gradle

88 lines
2.9 KiB
Groovy
Raw Normal View History

2021-01-04 16:23:54 +01:00
import net.fabricmc.loom.task.RemapJarTask
plugins {
alias(libs.plugins.shadow)
alias(libs.plugins.loom)
2021-01-04 16:23:54 +01:00
}
archivesBaseName = 'luckperms'
2021-01-04 16:23:54 +01:00
repositories {
maven { url 'https://maven.fabricmc.net/' }
}
dependencies {
// https://modmuss50.me/fabric.html
2023-12-11 20:29:39 +01:00
minecraft 'com.mojang:minecraft:1.20.4'
mappings 'net.fabricmc:yarn:1.20.4+build.1:v2'
modImplementation 'net.fabricmc:fabric-loader:0.15.1'
2021-01-04 16:23:54 +01:00
Set<String> apiModules = [
'fabric-api-base',
2022-06-11 22:14:14 +02:00
'fabric-command-api-v2',
2021-01-04 16:23:54 +01:00
'fabric-lifecycle-events-v1',
'fabric-networking-api-v1'
]
apiModules.forEach {
2023-12-11 20:29:39 +01:00
modImplementation(fabricApi.module(it, '0.91.2+1.20.4'))
2021-01-04 16:23:54 +01:00
}
2022-07-17 12:54:14 +02:00
include(modImplementation('me.lucko:fabric-permissions-api:0.2-SNAPSHOT'))
2021-01-04 16:23:54 +01:00
2021-08-20 19:16:39 +02:00
implementation project(':common')
2021-01-04 16:23:54 +01:00
}
processResources {
inputs.property 'version', project.ext.fullVersion
filesMatching('**/fabric.mod.json') {
2021-01-04 16:23:54 +01:00
expand 'version': project.ext.fullVersion
}
}
shadowJar {
2021-08-20 19:16:39 +02:00
archiveFileName = "luckpermsfabric-${project.ext.fullVersion}-dev.jar"
2021-01-04 16:23:54 +01:00
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'
2021-01-04 16:23:54 +01:00
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'
2022-11-26 19:06:15 +01:00
relocate 'io.nats.client', 'me.lucko.luckperms.lib.nats'
2021-02-04 18:10:30 +01:00
relocate 'com.rabbitmq', 'me.lucko.luckperms.lib.rabbitmq'
2021-01-04 16:23:54 +01:00
relocate 'org.apache.commons.pool2', 'me.lucko.luckperms.lib.commonspool2'
relocate 'ninja.leaping.configurate', 'me.lucko.luckperms.lib.configurate'
2022-09-30 21:20:57 +02:00
relocate 'org.yaml.snakeyaml', 'me.lucko.luckperms.lib.yaml'
2021-01-04 16:23:54 +01:00
}
task remappedShadowJar(type: RemapJarTask) {
dependsOn tasks.shadowJar
input = tasks.shadowJar.archiveFile
addNestedDependencies = true
2021-08-20 19:16:39 +02:00
archiveFileName = "LuckPerms-Fabric-${project.ext.fullVersion}.jar"
2021-01-04 16:23:54 +01:00
}
tasks.assemble.dependsOn tasks.remappedShadowJar
artifacts {
archives remappedShadowJar
shadow shadowJar
}