Skip to content

Commit

Permalink
Fix cf integration
Browse files Browse the repository at this point in the history
Gradle 8.10.2

update annotations and junit versions
  • Loading branch information
FlowArg committed Oct 13, 2024
1 parent 51b9a3f commit 095c462
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 7 deletions.
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apply plugin: 'maven-publish'
apply plugin: 'signing'

group 'fr.flowarg'
version '1.9.1'
version '1.9.2'
archivesBaseName = "flowupdater"

java {
Expand All @@ -31,11 +31,11 @@ java {
dependencies {
api 'com.google.code.gson:gson:2.11.0'
api 'fr.flowarg:flowmultitools:1.4.4'
api 'org.jetbrains:annotations:24.1.0'
api 'org.jetbrains:annotations:26.0.0'

// Only for internal tests
testImplementation 'fr.flowarg:openlauncherlib:3.2.10'
testImplementation 'org.junit.jupiter:junit-jupiter:5.11.0'
testImplementation 'fr.flowarg:openlauncherlib:3.2.11'
testImplementation 'org.junit.jupiter:junit-jupiter:5.11.2'
}

publishing {
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion src/main/java/fr/flowarg/flowupdater/FlowUpdater.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
public class FlowUpdater
{
/** FlowUpdater's version string constant */
public static final String FU_VERSION = "1.9.1";
public static final String FU_VERSION = "1.9.2";

/** Vanilla version's object to update/install */
private final VanillaVersion vanillaVersion;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public String fetchModLink(@NotNull CurseFileInfo curseFileInfo)
{
logger.warn(String.format("Mod file %s not available. The download can fail because of this! %s", data.get("displayName").getAsString(), jsonResponse));
final String id = Integer.toString(data.get("id").getAsInt());
downloadURL = String.format("https://mediafiles.forgecdn.net/files/%s/%s/%s", id.substring(0, 4), id.substring(4), fileName);
downloadURL = String.format("https://edge.forgecdn.net/files/%s/%s/%s", id.substring(0, 4), id.substring(4), fileName);
}
else downloadURL = downloadURLElement.getAsString();
final long fileLength = data.get("fileLength").getAsLong();
Expand Down
33 changes: 33 additions & 0 deletions src/test/java/fr/flowarg/flowupdater/Updates.java
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,39 @@ public static Result testWithNeoForgeUsage()
return new Result(updateDir, error, vanilla, neoForge);
}

public static Result testWithNeoForgeUsage2()
{
boolean error = false;
final String vanilla = "1.21.1";
final String neoForge = "21.1.18";
final Path updateDir = UPDATE_DIR.resolve("neo_forge-" + vanilla);

try
{
final VanillaVersion version = new VanillaVersion.VanillaVersionBuilder()
.withName(vanilla)
.build();

final NeoForgeVersion neoForgeVersion = new NeoForgeVersionBuilder()
.withNeoForgeVersion(neoForge)
.build();

final FlowUpdater updater = new FlowUpdater.FlowUpdaterBuilder()
.withVanillaVersion(version)
.withModLoaderVersion(neoForgeVersion)
.build();

updater.update(updateDir);
}
catch (Exception e)
{
error = true;
e.printStackTrace();
}

return new Result(updateDir, error, vanilla, neoForge);
}

public static class Result
{
public final Path updateDir;
Expand Down

0 comments on commit 095c462

Please sign in to comment.