-
Notifications
You must be signed in to change notification settings - Fork 237
Make fabric.mod.json path configurable at configuration stage.
#1364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
1c86983
1159657
87cb7b7
4dceae8
5f92ab2
4f790ba
a932931
af18d97
23f97b1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,7 +37,9 @@ | |
|
|
||
| import com.google.gson.JsonObject; | ||
| import com.google.gson.JsonSyntaxException; | ||
| import net.fabricmc.loom.api.LoomGradleExtensionAPI; | ||
| import org.gradle.api.Project; | ||
| import org.gradle.api.file.RegularFileProperty; | ||
| import org.gradle.api.tasks.SourceSet; | ||
| import org.jetbrains.annotations.Nullable; | ||
| import org.jetbrains.annotations.VisibleForTesting; | ||
|
|
@@ -109,7 +111,10 @@ public static Optional<FabricModJson> createFromZipOptional(Path zipPath) { | |
|
|
||
| @Nullable | ||
| public static FabricModJson createFromSourceSetsNullable(Project project, SourceSet... sourceSets) throws IOException { | ||
| final File file = SourceSetHelper.findFirstFileInResource(FABRIC_MOD_JSON, project, sourceSets); | ||
| final RegularFileProperty fmjPath = project.getExtensions().getByType(LoomGradleExtensionAPI.class).getFabricModJsonPath(); | ||
|
||
| final File file = fmjPath.isPresent() | ||
| ? fmjPath.getAsFile().get() | ||
| : SourceSetHelper.findFirstFileInResource(FABRIC_MOD_JSON, project, sourceSets); | ||
|
|
||
| if (file == null) { | ||
| return null; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.