EasyAuth/forge/build.gradle

80 lines
1.9 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
shadow "de.mkammerer:argon2-jvm:${argon2_version}"
// BCrypt
shadow "at.favre.lib:bcrypt:${bcrypt_version}"
shadow "at.favre.lib:bytes:${bytes_version}"
// Storage
// leveldb
shadow group: 'org.iq80.leveldb', name: 'leveldb', version: '0.12'
shadow group: 'org.iq80.leveldb', name: 'leveldb-api', version: '0.12'
// JNA lib
shadow '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()
}
}