Skip to content

Commit 095c462

Browse files
committed
Fix cf integration
Gradle 8.10.2 update annotations and junit versions
1 parent 51b9a3f commit 095c462

File tree

5 files changed

+40
-7
lines changed

5 files changed

+40
-7
lines changed

build.gradle

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ apply plugin: 'maven-publish'
44
apply plugin: 'signing'
55

66
group 'fr.flowarg'
7-
version '1.9.1'
7+
version '1.9.2'
88
archivesBaseName = "flowupdater"
99

1010
java {
@@ -31,11 +31,11 @@ java {
3131
dependencies {
3232
api 'com.google.code.gson:gson:2.11.0'
3333
api 'fr.flowarg:flowmultitools:1.4.4'
34-
api 'org.jetbrains:annotations:24.1.0'
34+
api 'org.jetbrains:annotations:26.0.0'
3535

3636
// Only for internal tests
37-
testImplementation 'fr.flowarg:openlauncherlib:3.2.10'
38-
testImplementation 'org.junit.jupiter:junit-jupiter:5.11.0'
37+
testImplementation 'fr.flowarg:openlauncherlib:3.2.11'
38+
testImplementation 'org.junit.jupiter:junit-jupiter:5.11.2'
3939
}
4040

4141
publishing {
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

src/main/java/fr/flowarg/flowupdater/FlowUpdater.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
public class FlowUpdater
3737
{
3838
/** FlowUpdater's version string constant */
39-
public static final String FU_VERSION = "1.9.1";
39+
public static final String FU_VERSION = "1.9.2";
4040

4141
/** Vanilla version's object to update/install */
4242
private final VanillaVersion vanillaVersion;

src/main/java/fr/flowarg/flowupdater/integrations/curseforgeintegration/CurseForgeIntegration.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public String fetchModLink(@NotNull CurseFileInfo curseFileInfo)
122122
{
123123
logger.warn(String.format("Mod file %s not available. The download can fail because of this! %s", data.get("displayName").getAsString(), jsonResponse));
124124
final String id = Integer.toString(data.get("id").getAsInt());
125-
downloadURL = String.format("https://mediafiles.forgecdn.net/files/%s/%s/%s", id.substring(0, 4), id.substring(4), fileName);
125+
downloadURL = String.format("https://edge.forgecdn.net/files/%s/%s/%s", id.substring(0, 4), id.substring(4), fileName);
126126
}
127127
else downloadURL = downloadURLElement.getAsString();
128128
final long fileLength = data.get("fileLength").getAsLong();

src/test/java/fr/flowarg/flowupdater/Updates.java

+33
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,39 @@ public static Result testWithNeoForgeUsage()
285285
return new Result(updateDir, error, vanilla, neoForge);
286286
}
287287

288+
public static Result testWithNeoForgeUsage2()
289+
{
290+
boolean error = false;
291+
final String vanilla = "1.21.1";
292+
final String neoForge = "21.1.18";
293+
final Path updateDir = UPDATE_DIR.resolve("neo_forge-" + vanilla);
294+
295+
try
296+
{
297+
final VanillaVersion version = new VanillaVersion.VanillaVersionBuilder()
298+
.withName(vanilla)
299+
.build();
300+
301+
final NeoForgeVersion neoForgeVersion = new NeoForgeVersionBuilder()
302+
.withNeoForgeVersion(neoForge)
303+
.build();
304+
305+
final FlowUpdater updater = new FlowUpdater.FlowUpdaterBuilder()
306+
.withVanillaVersion(version)
307+
.withModLoaderVersion(neoForgeVersion)
308+
.build();
309+
310+
updater.update(updateDir);
311+
}
312+
catch (Exception e)
313+
{
314+
error = true;
315+
e.printStackTrace();
316+
}
317+
318+
return new Result(updateDir, error, vanilla, neoForge);
319+
}
320+
288321
public static class Result
289322
{
290323
public final Path updateDir;

0 commit comments

Comments
 (0)