-
Notifications
You must be signed in to change notification settings - Fork 6
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
1 parent
7f27c73
commit 70a46d9
Showing
22 changed files
with
140 additions
and
202 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,80 @@ | ||
plugins { | ||
id "architectury-plugin" version "3.4-SNAPSHOT" | ||
id "dev.architectury.loom" version "1.7-SNAPSHOT" apply false | ||
id 'dev.architectury.loom' version '1.7-SNAPSHOT' apply false | ||
id 'architectury-plugin' version '3.4-SNAPSHOT' | ||
id 'com.github.johnrengelman.shadow' version '8.1.1' apply false | ||
} | ||
|
||
architectury { | ||
minecraft = rootProject.minecraft_version | ||
minecraft = project.minecraft_version | ||
} | ||
def createVersionString() { | ||
def builder = new StringBuilder() | ||
|
||
subprojects { | ||
apply plugin: "dev.architectury.loom" | ||
builder.append(mod_version) | ||
|
||
loom { | ||
silentMojangMappingsLicense() | ||
} | ||
builder.append('+mc').append(minecraft_version) | ||
|
||
dependencies { | ||
minecraft "com.mojang:minecraft:${rootProject.minecraft_version}" | ||
mappings loom.layered { | ||
it.mappings "net.fabricmc:yarn:${rootProject.yarn_mappings}:v2" | ||
it.mappings("dev.architectury:yarn-mappings-patch-neoforge:1.21+build.4") | ||
} | ||
//modRuntimeOnly group: "earth.terrarium.athena", name: "athena-$project.name-$minecraft_version", version: athena_version | ||
|
||
modCompileOnly files("../lib/chisel-1.6.jar") | ||
} | ||
return builder.toString() | ||
} | ||
|
||
allprojects { | ||
apply plugin: "java" | ||
apply plugin: "architectury-plugin" | ||
apply plugin: "maven-publish" | ||
version = createVersionString() | ||
group = rootProject.maven_group | ||
} | ||
|
||
subprojects { | ||
apply plugin: 'dev.architectury.loom' | ||
apply plugin: 'architectury-plugin' | ||
apply plugin: 'maven-publish' | ||
|
||
base { | ||
archivesName = rootProject.archives_base_name | ||
// Set up a suffixed format for the mod jar names, e.g. `example-fabric`. | ||
archivesName = "$rootProject.archives_name-$project.name" | ||
} | ||
|
||
version = rootProject.mod_version | ||
group = rootProject.maven_group | ||
|
||
repositories { | ||
// Add repositories to retrieve artifacts from in here. | ||
// You should only use this when depending on other mods because | ||
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically. | ||
// See https://docs.gradle.org/current/userguide/declaring_repositories.html | ||
// for more information about repositories. | ||
maven { | ||
url "https://maven.teamresourceful.com/repository/maven-public/" | ||
} | ||
maven { url "https://maven.neoforged.net/" } | ||
|
||
maven { url = "https://maven.terraformersmc.com/" } | ||
maven { url "https://maven.periut.com/" } | ||
} | ||
|
||
tasks.withType(JavaCompile) { | ||
options.encoding = "UTF-8" | ||
options.release = 21 | ||
dependencies { | ||
minecraft "net.minecraft:minecraft:$rootProject.minecraft_version" | ||
mappings loom.layered { | ||
it.mappings("net.fabricmc:yarn:$rootProject.yarn_mappings:v2") | ||
it.mappings("dev.architectury:yarn-mappings-patch-neoforge:$rootProject.yarn_mappings_patch_neoforge_version") | ||
} | ||
modImplementation "com.periut.chisel:chisel-${project.name}:2.0.0+mc${project.minecraft_version}" | ||
} | ||
|
||
java { | ||
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task | ||
// if it is present. | ||
// If you remove this line, sources will not be generated. | ||
withSourcesJar() | ||
|
||
sourceCompatibility = JavaVersion.VERSION_21 | ||
targetCompatibility = JavaVersion.VERSION_21 | ||
} | ||
|
||
tasks.withType(JavaCompile).configureEach { | ||
it.options.release = 21 | ||
} | ||
|
||
// Configure Maven publishing. | ||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
artifactId = base.archivesName.get() | ||
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. | ||
// Notice: This block does NOT have the same function as the block in the top level. | ||
// The repositories here will be used for publishing your artifact, not for | ||
// retrieving dependencies. | ||
} | ||
} | ||
} |
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
9 changes: 3 additions & 6 deletions
9
...incow/factoryblocks/FactoryBlocksMod.java → ...eriut/factoryblocks/FactoryBlocksMod.java
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
2 changes: 1 addition & 1 deletion
2
.../slaincow/factoryblocks/FactorySound.java → ...om/periut/factoryblocks/FactorySound.java
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
2 changes: 1 addition & 1 deletion
2
...incow/factoryblocks/TooltipBlockItem.java → ...eriut/factoryblocks/TooltipBlockItem.java
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
4 changes: 2 additions & 2 deletions
4
...factoryblocks/block/BaseFactoryBlock.java → ...factoryblocks/block/BaseFactoryBlock.java
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
4 changes: 2 additions & 2 deletions
4
...factoryblocks/block/fan/BaseFanBlock.java → ...factoryblocks/block/fan/BaseFanBlock.java
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
2 changes: 1 addition & 1 deletion
2
...ctoryblocks/block/fan/MediumFanBlock.java → ...ctoryblocks/block/fan/MediumFanBlock.java
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
2 changes: 1 addition & 1 deletion
2
...oryblocks/block/fan/RedstoneFanBlock.java → ...oryblocks/block/fan/RedstoneFanBlock.java
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
6 changes: 2 additions & 4 deletions
6
...factoryblocks/optional/ChiselSupport.java → ...factoryblocks/optional/ChiselSupport.java
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,81 +1,53 @@ | ||
plugins { | ||
id "com.github.johnrengelman.shadow" version "7.1.2" | ||
id 'com.github.johnrengelman.shadow' | ||
} | ||
|
||
architectury { | ||
platformSetupLoomIde() | ||
fabric() | ||
} | ||
|
||
loom { | ||
accessWidenerPath = project(":common").loom.accessWidenerPath | ||
} | ||
|
||
configurations { | ||
common | ||
shadowCommon // Don't use shadow from the shadow plugin since it *excludes* files. | ||
common { | ||
canBeResolved = true | ||
canBeConsumed = false | ||
} | ||
compileClasspath.extendsFrom common | ||
runtimeClasspath.extendsFrom common | ||
developmentFabric.extendsFrom common | ||
|
||
// Files in this configuration will be bundled into your mod using the Shadow plugin. | ||
// Don't use the `shadow` configuration from the plugin itself as it's meant for excluding files. | ||
shadowBundle { | ||
canBeResolved = true | ||
canBeConsumed = false | ||
} | ||
} | ||
|
||
dependencies { | ||
modImplementation "net.fabricmc:fabric-loader:${rootProject.loader_version}" | ||
modApi "net.fabricmc.fabric-api:fabric-api:${rootProject.fabric_version}" | ||
// Remove the next line if you don't want to depend on the API | ||
modImplementation "net.fabricmc:fabric-loader:$rootProject.fabric_loader_version" | ||
|
||
// Fabric API. This is technically optional, but you probably want it anyway. | ||
modImplementation "net.fabricmc.fabric-api:fabric-api:$rootProject.fabric_api_version" | ||
modApi "dev.architectury:architectury-fabric:${rootProject.architectury_version}" | ||
|
||
common(project(path: ":common", configuration: "namedElements")) { transitive false } | ||
shadowCommon(project(path: ":common", configuration: "transformProductionFabric")) { transitive false } | ||
common(project(path: ':common', configuration: 'namedElements')) { transitive false } | ||
shadowBundle project(path: ':common', configuration: 'transformProductionFabric') | ||
} | ||
|
||
processResources { | ||
inputs.property "version", project.version | ||
inputs.property 'version', project.version | ||
|
||
filesMatching("fabric.mod.json") { | ||
expand "version": project.version | ||
filesMatching('fabric.mod.json') { | ||
expand version: project.version | ||
} | ||
} | ||
|
||
shadowJar { | ||
exclude "architectury.common.json" | ||
|
||
configurations = [project.configurations.shadowCommon] | ||
archiveClassifier = "dev-shadow" | ||
configurations = [project.configurations.shadowBundle] | ||
archiveClassifier = 'dev-shadow' | ||
} | ||
|
||
remapJar { | ||
injectAccessWidener = true | ||
input.set shadowJar.archiveFile | ||
dependsOn shadowJar | ||
} | ||
|
||
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 | ||
} | ||
} | ||
|
||
base { | ||
archivesName = rootProject.archives_base_name + "-fabric-" + minecraft_version | ||
} | ||
|
||
// 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. | ||
} | ||
inputFile.set shadowJar.archiveFile | ||
} |
4 changes: 2 additions & 2 deletions
4
...oryblocks/fabric/FactoryBlocksFabric.java → ...oryblocks/fabric/FactoryBlocksFabric.java
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
Oops, something went wrong.