-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
66 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,25 @@ | ||
plugins { | ||
id "com.github.johnrengelman.shadow" version "${shadow_version}" | ||
} | ||
apply from: rootProject.file('gradle/platform.gradle') | ||
|
||
architectury { | ||
platformSetupLoomIde() | ||
fabric() | ||
} | ||
architectury.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 { | ||
common(project(path: ":common", configuration: "namedElements")) { transitive false } | ||
shadowCommon(project(path: ":common", configuration: "transformProductionFabric")) { transitive false } | ||
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric}" | ||
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric}" | ||
|
||
modImplementation "net.fabricmc.fabric-api:fabric-api:${rootProject.fabric_api}+${rootProject.minecraft_version}" | ||
|
||
modImplementation "com.terraformersmc:modmenu:${rootProject.modmenu}" | ||
|
||
modImplementation("com.simibubi.create:create-fabric-${rootProject.minecraft_version}:${rootProject.create_fabric}+mc${rootProject.minecraft_version}") | ||
|
||
if(rootProject.hasProperty("snr")) { | ||
if(rootProject.hasProperty('snr')) { | ||
modImplementation("com.railwayteam.railways:Steam_Rails-fabric-${minecraft_version}:${snr}+fabric-mc${minecraft_version}-build.${snr_build}") { transitive = false } | ||
} | ||
} | ||
|
||
shadowJar { | ||
exclude "architectury.common.json" | ||
|
||
configurations = [project.configurations.shadowCommon, project.configurations.shade] | ||
archiveClassifier.set "dev-shadow" | ||
} | ||
|
||
remapJar { | ||
injectAccessWidener = true | ||
input.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() | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
apply plugin: 'com.github.johnrengelman.shadow' | ||
|
||
String platform = project.name.substring(1).capitalize() | ||
|
||
architectury { | ||
platformSetupLoomIde() | ||
} | ||
|
||
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 | ||
} | ||
|
||
dependencies { | ||
common(project(path: ':common', configuration: 'namedElements')) { transitive false } | ||
shadowCommon(project(path: ':common', configuration: "transformProduction${platform}")) { transitive = false } | ||
} | ||
|
||
shadowJar { | ||
exclude 'architectury.common.json' | ||
|
||
configurations = [project.configurations.shadowCommon, project.configurations.shade] | ||
archiveClassifier = 'shadow' | ||
} | ||
|
||
remapJar { | ||
input.set shadowJar.archiveFile | ||
dependsOn shadowJar | ||
archiveClassifier = null | ||
} | ||
|
||
jar.archiveClassifier = 'dev' | ||
|
||
sourcesJar { | ||
def commonSources = project(':common').sourcesJar | ||
dependsOn commonSources | ||
from commonSources.archiveFile.map { zipTree(it) } | ||
} | ||
|
||
components.java { | ||
withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) { | ||
skip() | ||
} | ||
} |