Skip to content

Commit

Permalink
Finalize local profile to be used for local development
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheikah45 committed Jul 5, 2024
1 parent ff1b47c commit c07bf1f
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 8 deletions.
2 changes: 0 additions & 2 deletions src/main/java/com/faforever/client/api/FafApiAccessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
import org.springframework.beans.factory.ObjectFactory;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Lazy;
import org.springframework.context.annotation.Profile;
import org.springframework.http.HttpStatus;
import org.springframework.http.HttpStatusCode;
import org.springframework.http.MediaType;
Expand Down Expand Up @@ -77,7 +76,6 @@
@Lazy
@Slf4j
@Component
@Profile("!offline")
@RequiredArgsConstructor
public class FafApiAccessor implements InitializingBean {

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/faforever/client/patch/GameUpdaterImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import org.apache.maven.artifact.versioning.ComparableVersion;
import org.jetbrains.annotations.Nullable;
import org.springframework.beans.factory.ObjectFactory;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;

import java.io.IOException;
Expand All @@ -35,6 +36,7 @@
@Slf4j
@RequiredArgsConstructor
@Component
@Profile("!local")
public class GameUpdaterImpl implements GameUpdater {

private static final List<String> NAMES_OF_FEATURED_BASE_MODS = Stream.of(FAF, FAF_BETA, FAF_DEVELOP)
Expand Down
23 changes: 23 additions & 0 deletions src/main/java/com/faforever/client/patch/NoOpGameUpdater.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package com.faforever.client.patch;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.jetbrains.annotations.Nullable;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;

import java.util.Map;
import java.util.concurrent.CompletableFuture;

@Slf4j
@RequiredArgsConstructor
@Component
@Profile("local")
public class NoOpGameUpdater implements GameUpdater {

@Override
public CompletableFuture<Void> update(String featuredModName, @Nullable Map<String, Integer> featuredModFileVersions,
@Nullable Integer baseVersion, boolean forReplays) {
return CompletableFuture.completedFuture(null);
}
}
14 changes: 8 additions & 6 deletions src/main/resources/application-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,37 @@ faf-client:
server:
url: ws://localhost:8003

user:
base-url: http://localhost:8080

irc:
host: localhost
port: 6697

vault:
base-url: https://content.faforever.com
replay-download-url-format: https://replay.faforever.com/%s
base-url: http://localhost:8000
replay-download-url-format: http://replay.localhost/%s

news:
feed-url: https://direct.faforever.com/news/feed
feed-url: https://direct.localhost/news/feed

replay:
remote-host: localhost
remote-port: 15000

website:
base-url: http://localhost:8020
base-url: http://localhost:3000

api:
base-url: http://localhost:8010

forged-alliance:
exe-url: https://content.faforever.com/faf/updaterNew/updates_faf_files/ForgedAlliance.exe
exe-url: https://localhost:8000/faf/updaterNew/updates_faf_files/ForgedAlliance.exe

oauth:
base-url: http://localhost:4444
scopes: openid offline public_profile upload_map upload_mod lobby
client-id: faf-java-client
timeout-milliseconds: 1500000

logging:
level:
Expand Down

0 comments on commit c07bf1f

Please sign in to comment.