- plugins {
- id "com.github.johnrengelman.shadow" version "7.1.2"
- }
-
- architectury {
- platformSetupLoomIde()
- fabric()
- }
-
- 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
- developmentFabric.extendsFrom common
- }
-
- dependencies {
- modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
- #if (${FABRIC_API})
- modApi "net.fabricmc.fabric-api:fabric-api:${rootProject.fabric_api_version}"
- #end
- #if (${ARCHITECTURY_API})
- // Remove the next line if you don't want to depend on the API
- modApi "${ARCHITECTURY_GROUP}:architectury-fabric:${rootProject.architectury_version}"
- #end
-
- common(project(path: ":common", configuration: "namedElements")) { 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]
- archiveClassifier.set("dev-shadow")
- }
-
- remapJar {
- inputFile.set shadowJar.archiveFile
- dependsOn shadowJar
- archiveClassifier.set(null)
- }
-
- jar {
- archiveClassifier.set("dev")
- }
-
- sourcesJar {
- def commonSources = project(":common").sourcesJar
- dependsOn commonSources
- from commonSources.archiveFile.map { zipTree(it) }
- }
-
- components.java {
- withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) {
- skip()
- }
- }
-
- publishing {
- publications {
- mavenFabric(MavenPublication) {
- artifactId = rootProject.archives_base_name + "-" + project.name
- from components.java
- }
- }
-
- // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
- repositories {
- // Add repositories to publish to here.
- }
- }
- plugins {
- id "com.github.johnrengelman.shadow" version "7.1.2"
- }
-
- architectury {
- platformSetupLoomIde()
- fabric()
- }
-
- configurations {
- common
- shadowCommon // Don't use shadow from the shadow plugin since it *excludes* files.
- compileClasspath.extendsFrom common
- runtimeClasspath.extendsFrom common
- developmentFabric.extendsFrom common
- }
-
- dependencies {
- modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
- #if (${FABRIC_API})
- modApi "net.fabricmc.fabric-api:fabric-api:${rootProject.fabric_api_version}"
- #end
- #if (${ARCHITECTURY_API})
- // Remove the next line if you don't want to depend on the API
- modApi "${ARCHITECTURY_GROUP}:architectury-fabric:${rootProject.architectury_version}"
- #end
-
- common(project(path: ":common", configuration: "namedElements")) { 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]
- archiveClassifier = "dev-shadow"
- }
-
- remapJar {
- injectAccessWidener = true
- inputFile.set(shadowJar.archiveFile)
- dependsOn shadowJar
- archiveClassifier = null
- }
-
- jar {
- archiveClassifier.set("dev")
- }
-
- sourcesJar {
- def commonSources = project(":common").sourcesJar
- dependsOn commonSources
- from commonSources.archiveFile.map { zipTree(it) }
- }
-
- components.java {
- withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) {
- skip()
- }
- }
-
- publishing {
- publications {
- mavenFabric(MavenPublication) {
- artifactId = rootProject.archives_base_name + "-" + project.name
- from components.java
- }
- }
-
- // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
- repositories {
- // Add repositories to publish to here.
- }
- }