EasyAuth/forge/build.gradle

84 lines
2.0 KiB
Groovy

plugins {
id "com.github.johnrengelman.shadow" version "7.1.0"
}
architectury {
platformSetupLoomIde()
forge()
}
loom {
forge {
mixinConfig "mixins.simpleauth.json"
}
}
configurations {
common
shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this.
compileClasspath.extendsFrom common
runtimeClasspath.extendsFrom common
developmentForge.extendsFrom common
}
dependencies {
forge "net.minecraftforge:forge:${rootProject.minecraft_version}-${rootProject.forge_version}"
modApi "dev.architectury:architectury-forge:${rootProject.architectury_version}"
common(project(path: ":common", configuration: "namedElements")) { transitive = false }
shadowCommon(project(path: ":common", configuration: "transformProductionForge")) { transitive = false }
// Password hashing
// Argon2
shadowCommon ("de.mkammerer:argon2-jvm:${argon2_version}") {
exclude group: "net.java.dev.jna"
}
// BCrypt
shadowCommon "at.favre.lib:bcrypt:${bcrypt_version}"
shadowCommon "at.favre.lib:bytes:${bytes_version}"
// Storage
// leveldb
shadowCommon (group: 'org.iq80.leveldb', name: 'leveldb', version: '0.12') {
exclude group: "com.google.guava"
}
shadowCommon group: 'org.iq80.leveldb', name: 'leveldb-api', version: '0.12'
// JNA lib
compileOnly 'net.java.dev.jna:jna:5.5.0'
}
shadowJar {
exclude "fabric.mod.json"
configurations = [project.configurations.shadowCommon]
classifier "dev-shadow"
}
remapJar {
input.set shadowJar.archiveFile
dependsOn shadowJar
archiveClassifier = "forge"
}
jar {
classifier "dev"
manifest {
attributes([
"MixinConfigs": "mixins.simpleauth.json",
])
}
}
sourcesJar {
def commonSources = project(":common").sourcesJar
dependsOn commonSources
from commonSources.archiveFile.map { zipTree(it) }
}
components.java {
withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) {
skip()
}
}