mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-30 15:57:11 +00:00
Merge remote-tracking branch 'eclipse/main' into eclipse-main
This commit is contained in:
commit
98a09bd4e7
19 files changed
+185
-41
No files matched your search
+9
-8
@@ -8,7 +8,7 @@ GEM
|
||||
artifactory (3.0.17)
|
||||
atomos (0.1.3)
|
||||
aws-eventstream (1.4.0)
|
||||
aws-partitions (1.1290.0)
|
||||
aws-partitions (1.1292.0)
|
||||
aws-sdk-core (3.257.0)
|
||||
aws-eventstream (~> 1, >= 1.3.0)
|
||||
aws-partitions (~> 1, >= 1.992.0)
|
||||
@@ -21,7 +21,7 @@ GEM
|
||||
aws-sdk-kms (1.132.0)
|
||||
aws-sdk-core (~> 3, >= 3.256.0)
|
||||
aws-sigv4 (~> 1.5)
|
||||
aws-sdk-s3 (1.232.2)
|
||||
aws-sdk-s3 (1.233.1)
|
||||
aws-sdk-core (~> 3, >= 3.256.0)
|
||||
aws-sdk-kms (~> 1)
|
||||
aws-sigv4 (~> 1.5)
|
||||
@@ -45,7 +45,7 @@ GEM
|
||||
dotenv (2.8.1)
|
||||
emoji_regex (3.2.3)
|
||||
erb (6.0.7)
|
||||
excon (1.7.1)
|
||||
excon (1.6.0)
|
||||
logger
|
||||
faraday (2.14.4)
|
||||
faraday-net_http (>= 2.0, < 3.5)
|
||||
@@ -146,7 +146,7 @@ GEM
|
||||
base64 (~> 0.2)
|
||||
faraday (>= 1.0, < 3.a)
|
||||
google-cloud-errors (1.7.0)
|
||||
google-cloud-storage (1.62.0)
|
||||
google-cloud-storage (1.62.1)
|
||||
addressable (~> 2.8)
|
||||
digest-crc (~> 0.4)
|
||||
google-apis-core (>= 0.18, < 2)
|
||||
@@ -200,18 +200,18 @@ GEM
|
||||
pstore (0.2.1)
|
||||
public_suffix (7.0.5)
|
||||
rake (13.4.2)
|
||||
rbs (4.2.0)
|
||||
rbs (4.1.3)
|
||||
logger
|
||||
prism (>= 1.6.0)
|
||||
tsort
|
||||
rdoc (8.0.0)
|
||||
rdoc (8.1.0)
|
||||
erb
|
||||
prism (>= 1.6.0)
|
||||
rbs (>= 4.0.0)
|
||||
tsort
|
||||
reline (0.7.0)
|
||||
io-console (~> 0.5)
|
||||
representable (3.3.0)
|
||||
representable (3.3.1)
|
||||
declarative (< 0.1.0)
|
||||
trailblazer-option (>= 0.1.1, < 0.2.0)
|
||||
uber (< 0.2.0)
|
||||
@@ -260,9 +260,10 @@ PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
fastlane (> 0)
|
||||
fastlane (>= 2.222.0)
|
||||
fastlane-plugin-json
|
||||
fastlane-plugin-properties
|
||||
googleauth (>= 1.11.0)
|
||||
highline (> 0)
|
||||
json (> 0)
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ extends:
|
||||
# requestAuthentication: true # enable if fetching dependencies from Artifactory or Nexus
|
||||
appCenterSlug: 'sapsailing/sapsailing-android-apps'
|
||||
jdkVersion: 21
|
||||
androidVersion: 35
|
||||
androidVersion: 36
|
||||
# We are building more than one app from our repository; we will use branches
|
||||
# to determine which app is to be built/released/signed
|
||||
# Default: Race Manager App
|
||||
|
||||
+6
-6
@@ -13,7 +13,7 @@ buildscript {
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:8.7.3'
|
||||
classpath 'com.android.tools.build:gradle:8.13.2'
|
||||
classpath "org.ajoberstar.grgit:grgit-core:5.3.0"
|
||||
}
|
||||
}
|
||||
@@ -49,18 +49,18 @@ allprojects {
|
||||
// dependency versions for all sub modules
|
||||
ext {
|
||||
// regular
|
||||
buildTools = "34.0.0"
|
||||
compileSdk = 33
|
||||
buildTools = "36.0.0"
|
||||
compileSdk = 36
|
||||
minSdk = 16
|
||||
targetSdk = 35
|
||||
targetSdk = 36
|
||||
|
||||
sourceCompatibilityVersion = JavaVersion.VERSION_1_8
|
||||
targetCompatibilityVersion = JavaVersion.VERSION_1_8
|
||||
|
||||
support = "27.1.1"
|
||||
play_services_maps = "17.0.1"
|
||||
play_services_location = "12.0.1"
|
||||
play_services_vision = "12.0.1"
|
||||
play_services_location = "21.0.1"
|
||||
play_services_vision = "19.0.0"
|
||||
|
||||
license_dialog = "1.8.0"
|
||||
|
||||
|
||||
@@ -6,13 +6,13 @@ ruby "3.2.8"
|
||||
|
||||
gem "gollum", "5.3.2"
|
||||
|
||||
gem "sinatra", "2.2.4"
|
||||
gem "sinatra", "4.2.0"
|
||||
gem "sinatra-contrib", "2.2.4"
|
||||
|
||||
gem "rack", "2.2.9"
|
||||
gem "rack", "2.2.23"
|
||||
gem "rack-protection", "2.2.4"
|
||||
|
||||
gem "webrick", "1.8.1"
|
||||
gem "webrick", "1.8.2"
|
||||
|
||||
gem "rugged", "1.7.2"
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import socket
|
||||
|
||||
host = ''
|
||||
host = '127.0.0.1'
|
||||
port = 50000
|
||||
backlog = 5
|
||||
size = 1024
|
||||
|
||||
@@ -45,6 +45,21 @@ platform :android do
|
||||
|
||||
gradle(task: "assembleRelease") # Build .apk
|
||||
#gradle(task: "bundleRelease") # Build .aab
|
||||
strip_build_type_from_apk_names(build_type: "release")
|
||||
end
|
||||
|
||||
# Central Signing only signs APK file names allow-listed by Non-ABAP Assembly, as listed in each
|
||||
# app's files2sign.json (<module>-unsigned.apk). AGP 8 names release APKs <module>-release-unsigned.apk,
|
||||
# and its new Variant API no longer supports renaming outputs, so we rename them here.
|
||||
def strip_build_type_from_apk_names(build_type:)
|
||||
suffix = "-#{build_type}-unsigned.apk"
|
||||
apks = (lane_context[SharedValues::GRADLE_ALL_APK_OUTPUT_PATHS] || []).select { |apk| apk.end_with?(suffix) }
|
||||
UI.user_error!("No APK ending in #{suffix} found after Gradle build") if apks.empty?
|
||||
apks.each do |apk|
|
||||
target = apk.delete_suffix(suffix) + "-unsigned.apk"
|
||||
UI.message("Renaming #{apk} to #{File.basename(target)}")
|
||||
File.rename(apk, target)
|
||||
end
|
||||
end
|
||||
|
||||
desc "Call Kotlin Lint"
|
||||
|
||||
@@ -82,6 +82,7 @@ Import-Package: com.google.protobuf;version="4.28.3",
|
||||
com.sap.sailing.aiagent.interfaces,
|
||||
com.sap.sailing.domain.igtimiadapter.server.riot,
|
||||
com.sap.sse.aicore,
|
||||
elemental2.dom,
|
||||
javax.servlet;version="3.1.0",
|
||||
javax.servlet.descriptor;version="3.1.0",
|
||||
javax.servlet.http;version="3.1.0",
|
||||
|
||||
+1
-1
@@ -280,7 +280,7 @@ public interface SailingServiceWrite extends FileStorageManagementGwtService, Sa
|
||||
|
||||
UUID importMasterData(String host, UUID[] leaderboardGroupIds, boolean override, boolean compress, boolean exportWind,
|
||||
boolean exportDeviceConfigurations, String targetServerUsername, String targetServerPassword,
|
||||
boolean exportTrackedRacesAndStartTracking) throws UnauthorizedException;
|
||||
boolean exportTrackedRacesAndStartTracking) throws Exception;
|
||||
|
||||
RegattaDTO createRegatta(String regattaName, String boatClassName, boolean canBoatsOfCompetitorsChangePerRace,
|
||||
CompetitorRegistrationType competitorRegistrationType, String registrationLinkSecret, Date startDate,
|
||||
|
||||
+1
@@ -2614,4 +2614,5 @@ public interface StringMessages extends com.sap.sse.gwt.client.StringMessages,
|
||||
String noAutomatedTrackingTimes(String leaderboardName);
|
||||
String unknownError(String name);
|
||||
String pendingServerOperations(Integer numberOfPendingServerOperations);
|
||||
String masterDataImportOnlyFromTrustedDomains(String trustedDomains, String host);
|
||||
}
|
||||
+2
-1
@@ -2649,4 +2649,5 @@ notRevokedTrackingTimesBecauseOfMissingStartOrFinishTime=Not revoked tracking ti
|
||||
noRegattaLeaderboard=Leaderboard {0} is not a regatta leaderboard.
|
||||
noAutomatedTrackingTimes=Leaderboard {0} has no automated tracking times.
|
||||
unknownError=Unknown error: {0}
|
||||
pendingServerOperations=Data fetches pending: {0}
|
||||
pendingServerOperations=Data fetches pending: {0}
|
||||
masterDataImportOnlyFromTrustedDomains=Master data import (MDI) allowed only from trusted domains ({0}). {1} is not trusted.
|
||||
+2
-1
@@ -2643,4 +2643,5 @@ notRevokedTrackingTimesBecauseOfMissingStartOrFinishTime=Nicht widerrufene expli
|
||||
noRegattaLeaderboard=Rangliste {0} ist keine Regatta-Rangliste.
|
||||
noAutomatedTrackingTimes=Rangliste {0} nutzt keine automatisierten Tracking-Zeiten, auf die zurückgesetzt werden könnte.
|
||||
unknownError=Unbekannter Fehler: {0}
|
||||
pendingServerOperations=Anhängige Ladeoperationen: {0}
|
||||
pendingServerOperations=Anhängige Ladeoperationen: {0}
|
||||
masterDataImportOnlyFromTrustedDomains=Master data import (MDI) nur von vertrauenswürdigen Domains erlaubt ({0}). {1} ist nicht vertrauenswürdig.
|
||||
+17
-9
@@ -32,6 +32,7 @@ import com.sap.sailing.domain.common.MasterDataImportObjectCreationCount;
|
||||
import com.sap.sailing.gwt.ui.adminconsole.places.AdminConsoleView.Presenter;
|
||||
import com.sap.sailing.gwt.ui.client.SailingServiceWriteAsync;
|
||||
import com.sap.sailing.gwt.ui.client.StringMessages;
|
||||
import com.sap.sailing.landscape.common.SharedLandscapeConstants;
|
||||
import com.sap.sse.common.Util;
|
||||
import com.sap.sse.common.Util.Pair;
|
||||
import com.sap.sse.common.filter.impl.KeywordMatcher;
|
||||
@@ -289,9 +290,15 @@ public class MasterDataImportPanel extends VerticalPanel {
|
||||
}
|
||||
|
||||
protected void fireIdRequestsAndFillLists() {
|
||||
String host = hostBox.getText();
|
||||
if (host != null && !host.isEmpty()) {
|
||||
fireLgIdRequestAndFillList(host);
|
||||
final String host = hostBox.getText();
|
||||
final elemental2.dom.URL url = new elemental2.dom.URL(host);
|
||||
if (!SharedLandscapeConstants.isTrustedDomain(url.host)) {
|
||||
Notification.notify(stringMessages.masterDataImportOnlyFromTrustedDomains(
|
||||
SharedLandscapeConstants.TRUSTED_DOMAINS.toString(), url.host), NotificationType.ERROR);
|
||||
} else {
|
||||
if (host != null && !host.isEmpty()) {
|
||||
fireLgIdRequestAndFillList(host);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -374,7 +381,6 @@ public class MasterDataImportPanel extends VerticalPanel {
|
||||
|
||||
private void setFilterHandler(final TextBox filterBox) {
|
||||
filterBox.addKeyUpHandler(new KeyUpHandler() {
|
||||
|
||||
@Override
|
||||
public void onKeyUp(KeyUpEvent event) {
|
||||
filterLeaderboardGroupList();
|
||||
@@ -398,11 +404,13 @@ public class MasterDataImportPanel extends VerticalPanel {
|
||||
return Collections.singleton(t);
|
||||
}
|
||||
};
|
||||
Map<String, String> filteredMap = allLeaderboardGroupsNameAndIdsMap.entrySet().stream()
|
||||
.filter(entry -> matcher.matches(filterTexts, entry.getValue()))
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
||||
fillLeaderboardGroupListBox(filteredMap);
|
||||
changeButtonStateAccordingToApplicationState();
|
||||
if (allLeaderboardGroupsNameAndIdsMap != null) {
|
||||
Map<String, String> filteredMap = allLeaderboardGroupsNameAndIdsMap.entrySet().stream()
|
||||
.filter(entry -> matcher.matches(filterTexts, entry.getValue()))
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
||||
fillLeaderboardGroupListBox(filteredMap);
|
||||
changeButtonStateAccordingToApplicationState();
|
||||
}
|
||||
}
|
||||
|
||||
private void fillLeaderboardGroupListBox(Map<String, String> leaderboardGroupsMap) {
|
||||
|
||||
+7
-1
@@ -300,6 +300,7 @@ import com.sap.sailing.gwt.ui.shared.courseCreation.CourseTemplateDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.courseCreation.MarkPropertiesDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.courseCreation.MarkRoleDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.courseCreation.MarkTemplateDTO;
|
||||
import com.sap.sailing.landscape.common.SharedLandscapeConstants;
|
||||
import com.sap.sailing.server.hierarchy.SailingHierarchyOwnershipUpdater;
|
||||
import com.sap.sailing.server.interfaces.RacingEventService;
|
||||
import com.sap.sailing.server.operationaltransformation.AbstractLeaderboardGroupOperation;
|
||||
@@ -405,6 +406,7 @@ import com.sap.sse.security.shared.impl.SecuredSecurityTypes.ServerActions;
|
||||
import com.sap.sse.security.shared.impl.UserGroup;
|
||||
import com.sap.sse.security.ui.server.SecurityDTOUtil;
|
||||
import com.sap.sse.security.ui.shared.SuccessInfo;
|
||||
import com.sap.sse.security.util.RemoteServerUtil;
|
||||
import com.sap.sse.shared.media.ImageDescriptor;
|
||||
import com.sap.sse.shared.media.VideoDescriptor;
|
||||
import com.sap.sse.shared.util.impl.UUIDHelper;
|
||||
@@ -1792,7 +1794,7 @@ public class SailingServiceWriteImpl extends SailingServiceImpl implements Saili
|
||||
public UUID importMasterData(final String urlAsString, final UUID[] leaderboardGroupIds, final boolean override,
|
||||
final boolean compress, final boolean exportWind, final boolean exportDeviceConfigurations,
|
||||
String targetServerUsername, String targetServerPassword,
|
||||
final boolean exportTrackedRacesAndStartTracking) {
|
||||
final boolean exportTrackedRacesAndStartTracking) throws MalformedURLException {
|
||||
final UUID importOperationId = UUID.randomUUID();
|
||||
getSecurityService().checkCurrentUserServerPermission(ServerActions.CAN_IMPORT_MASTERDATA);
|
||||
final String targetServerBearerToken;
|
||||
@@ -1801,6 +1803,10 @@ public class SailingServiceWriteImpl extends SailingServiceImpl implements Saili
|
||||
} else {
|
||||
targetServerBearerToken = null;
|
||||
}
|
||||
final URL url = RemoteServerUtil.createBaseUrl(urlAsString);
|
||||
if (!SharedLandscapeConstants.isTrustedDomain(url.getHost())) {
|
||||
throw new IllegalArgumentException("not a trusted domain; valid domains are: "+SharedLandscapeConstants.TRUSTED_DOMAINS);
|
||||
}
|
||||
// Create a progress indicator for as long as the server gets data from the other server.
|
||||
// As soon as the server starts the import operation, a progress object will be built on every server
|
||||
Runnable masterDataImportTask = new Runnable() {
|
||||
|
||||
@@ -15,7 +15,15 @@
|
||||
android:name="com.sap.sailing.android.shared.application.LoggableApplication"
|
||||
android:allowBackup="true"
|
||||
android:hardwareAccelerated="true"
|
||||
android:networkSecurityConfig="@xml/network_security_config">
|
||||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
android:enableOnBackInvokedCallback="false">
|
||||
<!-- Temporary Android 16 (targetSdk 36) opt-outs, merged into all apps' manifests:
|
||||
enableOnBackInvokedCallback="false" keeps onBackPressed()/KEYCODE_BACK being dispatched
|
||||
instead of predictive back; the property keeps orientation/resizability restrictions on
|
||||
large screens (sw600dp). The latter is ignored when targeting API level 37. -->
|
||||
<property
|
||||
android:name="android.window.PROPERTY_COMPAT_ALLOW_RESTRICTED_RESIZABILITY"
|
||||
android:value="true" />
|
||||
<meta-data
|
||||
android:name="com.google.android.gms.version"
|
||||
android:value="@integer/google_play_services_version" />
|
||||
|
||||
+5
-1
@@ -7,11 +7,13 @@ import com.sap.sailing.android.shared.R;
|
||||
import com.sap.sailing.android.shared.logging.ExLog;
|
||||
import com.sap.sailing.android.shared.logging.LifecycleLogger;
|
||||
import com.sap.sailing.android.shared.logging.LoggingExceptionHandler;
|
||||
import com.sap.sailing.android.shared.ui.utils.SystemBarInsetsHandler;
|
||||
import com.sap.sailing.android.shared.util.PrefUtils;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Build;
|
||||
import io.branch.referral.Branch;
|
||||
|
||||
/**
|
||||
@@ -51,7 +53,9 @@ public class LoggableApplication extends Application {
|
||||
Branch.enableLogging();
|
||||
}
|
||||
Branch.getAutoInstance(this);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM) {
|
||||
registerActivityLifecycleCallbacks(new SystemBarInsetsHandler());
|
||||
}
|
||||
}
|
||||
|
||||
public static void restartApp(Context context) {
|
||||
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
package com.sap.sailing.android.shared.ui.utils;
|
||||
|
||||
import com.sap.sailing.android.shared.R;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.Activity;
|
||||
import android.app.Application;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Insets;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.util.TypedValue;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowInsets;
|
||||
import android.view.WindowManager;
|
||||
|
||||
/**
|
||||
* Apps targeting Android 15 (API level 35) or higher are drawn edge-to-edge on Android 15+ devices, i.e., behind the
|
||||
* status bar, the navigation (button/gesture) bar and display cutouts; when targeting API level 36, this can no longer
|
||||
* be opted out of. The system then also stops resizing windows for the soft keyboard and drawing the status bar color.
|
||||
* <p>
|
||||
* Registered for all activities, this restores the previous layout: each activity's content view gets padded by the
|
||||
* system bar and display cutout insets (and by the keyboard insets unless the activity pans or ignores the keyboard),
|
||||
* so that no content is hidden behind them, and the status bar area is filled with the theme's
|
||||
* {@code colorPrimaryDark}, which used to be the status bar color.
|
||||
* <p>
|
||||
* Only register on devices running Android 15 or higher; older versions lay out activities below and above the system
|
||||
* bars by themselves.
|
||||
*/
|
||||
@TargetApi(Build.VERSION_CODES.VANILLA_ICE_CREAM)
|
||||
public class SystemBarInsetsHandler implements Application.ActivityLifecycleCallbacks {
|
||||
|
||||
@Override
|
||||
public void onActivityPostCreated(final Activity activity, final Bundle savedInstanceState) {
|
||||
final Window window = activity.getWindow();
|
||||
final View decorView = window.getDecorView();
|
||||
final View content = decorView.findViewById(android.R.id.content);
|
||||
final ColorDrawable statusBarBackground = new ColorDrawable(resolveStatusBarColor(activity));
|
||||
decorView.getOverlay().add(statusBarBackground);
|
||||
decorView.addOnLayoutChangeListener((view, left, top, right, bottom, oldLeft, oldTop, oldRight,
|
||||
oldBottom) -> statusBarBackground.setBounds(0, 0, right - left,
|
||||
statusBarBackground.getBounds().height()));
|
||||
content.setOnApplyWindowInsetsListener((view, insets) -> {
|
||||
final Insets bars = insets
|
||||
.getInsets(WindowInsets.Type.systemBars() | WindowInsets.Type.displayCutout());
|
||||
final int softInputAdjust = window.getAttributes().softInputMode
|
||||
& WindowManager.LayoutParams.SOFT_INPUT_MASK_ADJUST;
|
||||
final boolean resizeForKeyboard = softInputAdjust != WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN
|
||||
&& softInputAdjust != WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING;
|
||||
final int keyboardHeight = resizeForKeyboard ? insets.getInsets(WindowInsets.Type.ime()).bottom : 0;
|
||||
view.setPadding(bars.left, bars.top, bars.right, Math.max(bars.bottom, keyboardHeight));
|
||||
statusBarBackground.setBounds(0, 0, decorView.getWidth(), bars.top);
|
||||
return WindowInsets.CONSUMED;
|
||||
});
|
||||
content.requestApplyInsets();
|
||||
}
|
||||
|
||||
private int resolveStatusBarColor(final Activity activity) {
|
||||
final TypedValue typedValue = new TypedValue();
|
||||
final boolean resolved = activity.getTheme().resolveAttribute(R.attr.colorPrimaryDark, typedValue,
|
||||
/* resolveRefs */ true);
|
||||
return resolved ? typedValue.data : Color.BLACK;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityCreated(final Activity activity, final Bundle savedInstanceState) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityStarted(final Activity activity) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityResumed(final Activity activity) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityPaused(final Activity activity) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityStopped(final Activity activity) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivitySaveInstanceState(final Activity activity, final Bundle outState) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityDestroyed(final Activity activity) {
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -50,6 +50,7 @@ import com.google.android.gms.location.LocationResult;
|
||||
import com.google.android.gms.location.LocationServices;
|
||||
import com.google.android.gms.location.LocationSettingsRequest;
|
||||
import com.google.android.gms.location.LocationSettingsResponse;
|
||||
import com.google.android.gms.location.Priority;
|
||||
import com.google.android.gms.location.SettingsClient;
|
||||
import com.google.android.gms.tasks.OnFailureListener;
|
||||
import com.google.android.gms.tasks.OnSuccessListener;
|
||||
@@ -172,10 +173,9 @@ public class WindFragment extends BaseFragment
|
||||
// initialize the googleApiClient for location requests
|
||||
apiClient = LocationServices.getFusedLocationProviderClient(requireContext());
|
||||
settingsClient = LocationServices.getSettingsClient(requireContext());
|
||||
locationRequest = LocationRequest.create();
|
||||
locationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);
|
||||
locationRequest.setInterval(FIVE_SEC);
|
||||
locationRequest.setFastestInterval(EVERY_POSITION_CHANGE);
|
||||
locationRequest = new LocationRequest.Builder(Priority.PRIORITY_HIGH_ACCURACY, FIVE_SEC)
|
||||
.setMinUpdateIntervalMillis(EVERY_POSITION_CHANGE)
|
||||
.build();
|
||||
locationSettingsRequest = new LocationSettingsRequest.Builder()
|
||||
.addLocationRequest(locationRequest)
|
||||
.build();
|
||||
|
||||
+6
-2
@@ -21,6 +21,10 @@
|
||||
]
|
||||
}
|
||||
],
|
||||
"enabledManagers": [ "bundler" ],
|
||||
"baseBranches": [ "hyperspace" ]
|
||||
"enabledManagers": [
|
||||
"bundler"
|
||||
],
|
||||
"baseBranchPatterns": [
|
||||
"hyperspace"
|
||||
]
|
||||
}
|
||||
@@ -91,7 +91,7 @@ When working with Hyperspace to prepare the creation of the actual Azure Pipelin
|
||||
|
||||
The pipeline configuration is produced as a [Github pull request](https://github.tools.sap/SAP-Sailing-Analytics/sapsailing/pull/1) for the Git repository used for Hyperspace onboarding. In particular, it contains a "Fastlane" configuration under ``fastlane/Fastfile`` and the actual pipeline configuration in ``azure-pipelines/mail.yml``. The fastlane config in ``fastlane/Fastfile`` we could slighly adjust and simplify because we only build ``.apk`` files, no ``.aab`` libraries. Furthermore, we need adjustments for the location of the ``gradle.properties`` file into which a git-based technical version identifier shall be generated during the build process. Later more on the details of this.
|
||||
|
||||
In the ``azure-pipelines/main.yml`` file under the ``trigger:`` property we configure which Git branches and/or tags shall trigger a pipeline execution. The core part then is defined by a reference to the pipeline's template, and specific adjustments can then be made to the template pipeline in the ``extends:`` section. The ``isRelease`` boolean property controls whether the build shall be a release build that triggers code signing, in particular. The ``productiveBranchName`` property controls for buils of which branch all scanning and test tasks shall be performed. We required special adjustments of the ``jdkVersion`` property to ``17`` and the ``androidVersion`` to ``35`` for our Gradle app build to work. Furthermore, the MoMa Assembly ID must be configured in the ``momaAssemblyId`` property. Each app folder now has its own ``files2sign.json`` file in its app folder under ``mobile/`` because this allows us to limit the build output to files under the app's own folder.
|
||||
In the ``azure-pipelines/main.yml`` file under the ``trigger:`` property we configure which Git branches and/or tags shall trigger a pipeline execution. The core part then is defined by a reference to the pipeline's template, and specific adjustments can then be made to the template pipeline in the ``extends:`` section. The ``isRelease`` boolean property controls whether the build shall be a release build that triggers code signing, in particular. The ``productiveBranchName`` property controls for buils of which branch all scanning and test tasks shall be performed. We required special adjustments of the ``jdkVersion`` property to ``21`` and the ``androidVersion`` to ``36`` for our Gradle 8 / AGP 8 app build to work. The ``androidVersion`` has to match the ``compileSdk``/``targetSdk`` in the root ``build.gradle``; Google Play requires app updates to target a recent API level (API level 36 since August 31, 2026), otherwise the upload fails with "Target SDK of artifact is too low: {versionCode}". Furthermore, the MoMa Assembly ID must be configured in the ``momaAssemblyId`` property. Each app folder now has its own ``files2sign.json`` file in its app folder under ``mobile/`` because this allows us to limit the build output to files under the app's own folder. The ``file`` property in ``files2sign.json`` must exactly match the name of the unsigned ``.apk`` staged by the build, because the "Call Central Signing Service" step of the pipeline template's central signing stage signs ``Binaries/Android/{file}`` literally. Furthermore, this file name is allow-listed by Non-ABAP Assembly (NAAS) for the MoMa assembly, together with group ID and artifact ID; a name not allow-listed yields an HTTP 406 "The requested list doesn't exist in the library files" from the SignServer. Our allow-listed names are ``{module-directory}-unsigned.apk``, e.g., ``com.sap.sailing.racecommittee.app-unsigned.apk``. Since AGP 8 names release APKs ``{module-directory}-release-unsigned.apk`` and its new Variant API no longer supports renaming outputs, the ``releaseBuild`` lane in ``fastlane/Fastfile`` renames them after ``assembleRelease``. (The "Find and Export Binaries" step finding an ``.apk`` does not imply that the name in ``files2sign.json`` matches.)
|
||||
|
||||
Since we want to build and release two apps out of one Git repo and ideally with one pipeline, we work with Git branches, one per app that we want to release, as follows:
|
||||
|
||||
|
||||
Reference in new issue
Block a user