Skip to content

Commit

Permalink
Loom 1.9, Gradle 8.11.1 and run datagen from client
Browse files Browse the repository at this point in the history
  • Loading branch information
modmuss50 committed Dec 1, 2024
1 parent 0e5659a commit 0837451
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion scripts/src/lib/Versions.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ fabric_version={apiVersion}

<h2>Loom</h2>

<p>The recommended loom version is <strong>1.8-SNAPSHOT</strong>. This is usually defined near the top of your build.gradle file.</p>
<p>The recommended loom version is <strong>1.9-SNAPSHOT</strong>. This is usually defined near the top of your build.gradle file.</p>

<style>
.copy-code {
Expand Down
6 changes: 4 additions & 2 deletions scripts/src/lib/template/modentrypoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ async function generateJavaEntrypoint(writer: TemplateWriter, options: ClassOpti
}

if (options.dataEntrypoint) {
await writer.write(`src/main/java/${options.path}DataGenerator.java`, renderTemplate(javaEntrypointDataGeneratorTemplate, {...options, className: options.className + "DataGenerator"}));
const sourceSet = options.clientEntrypoint ? "client" : "main";
await writer.write(`src/${sourceSet}/java/${options.path}DataGenerator.java`, renderTemplate(javaEntrypointDataGeneratorTemplate, {...options, className: options.className + "DataGenerator"}));

entrypoints = {
...entrypoints,
Expand Down Expand Up @@ -109,7 +110,8 @@ async function generateKotlinEntrypoint(writer: TemplateWriter, options: ClassOp
}

if (options.dataEntrypoint) {
await writer.write(`src/main/kotlin/${options.path}DataGenerator.kt`, renderTemplate(kotlinEntrypointDataGeneratorTemplate, {...options, className: options.className + "DataGenerator"}))
const sourceSet = options.clientEntrypoint ? "client" : "main";
await writer.write(`src/${sourceSet}/kotlin/${options.path}DataGenerator.kt`, renderTemplate(kotlinEntrypointDataGeneratorTemplate, {...options, className: options.className + "DataGenerator"}))

entrypoints = {
...entrypoints,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '1.8-SNAPSHOT'
id 'fabric-loom' version '1.9-SNAPSHOT'
id 'maven-publish'
<%_ if (it.kotlin) { %>
id "org.jetbrains.kotlin.jvm" version "<%= it.kotlin.kotlinVersion %>"
Expand Down Expand Up @@ -34,7 +34,9 @@ loom {
}
<% } %><% if (it.dataGeneration) { %>
fabricApi {
configureDataGeneration()
configureDataGeneration {
client = true
}
}
<% } %>
dependencies {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down

0 comments on commit 0837451

Please sign in to comment.