flan/fabric/build.gradle
2021-06-13 23:07:10 +02:00

115 lines
3.1 KiB
Groovy

plugins {
id "com.github.johnrengelman.shadow" version "5.0.0"
}
configurations {
shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this.
}
architectury {
platformSetupLoomIde()
fabric()
}
repositories {
mavenCentral()
maven {
name = 'Fabric-Permission-API'
url 'https://oss.sonatype.org/content/repositories/snapshots'
}
maven {
name = "Gunpowder"
url = "https://maven.martmists.com/releases"
}
maven {
name = 'Ladysnake Mods'
url = 'https://ladysnake.jfrog.io/artifactory/mods'
content {
includeGroup 'io.github.ladysnake'
includeGroupByRegex 'io\\.github\\.onyxstudios.*'
}
}
}
dependencies {
modImplementation "net.fabricmc:fabric-loader:${rootProject.loader_version}"
// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${rootProject.fabric_version}"
modImplementation "me.lucko:fabric-permissions-api:${rootProject.fabric_permissions_api}"
modCompileOnly "io.github.gunpowder:gunpowder-api:${rootProject.gunpowder_version}+1.16.2"
modImplementation "io.github.ladysnake:PlayerAbilityLib:${rootProject.player_ability_lib}"
implementation(project(path: ":common")) {
transitive = false
}
developmentFabric(project(path: ":common")) {
transitive = false
}
shadowCommon(project(path: ":common", configuration: "transformProductionFabric")) {
transitive = false
}
}
processResources {
inputs.property "version", project.version
filesMatching("fabric.mod.json") {
expand "version": project.version
}
}
shadowJar {
configurations = [project.configurations.shadowCommon]
classifier "dev-shadow"
}
remapJar {
input.set shadowJar.archiveFile
dependsOn shadowJar
classifier "fabric"
}
jar {
classifier "dev"
}
java {
withSourcesJar()
}
sourcesJar {
def commonSources = project(":common").sourcesJar
dependsOn commonSources
from commonSources.archiveFile.map { zipTree(it) }
classifier "fabric-source"
}
publishing {
publications {
mavenJava(MavenPublication) {
// add all the jars that should be included when publishing to maven
artifact(remapJar) {
builtBy remapJar
}
artifact(sourcesJar) {
builtBy remapSourcesJar
}
artifactId project.archives_base_name
version project.version
}
}
repositories {
maven {
url "https://gitlab.com/api/v4/projects/21830712/packages/maven"
//url "https://maven.pkg.github.com/flemmli97/<>"
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("GPR_USER")
password = project.findProperty("gpr.gitlab.token") ?: System.getenv("GPR_GITLAB_TOKEN")
//password = project.findProperty("gpr.github.token") ?: System.getenv("GPR_TOKEN")
}
}
}
}