mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-16 01:01:02 +00:00
Merge remote-tracking branch 'server/regatta-log' into regatta-log
This commit is contained in:
commit
d0b8c66a52
28 files changed
+202
-225
No files matched your search
@@ -13,6 +13,13 @@
|
||||
<artifactId>com.sap.sailing.android.tracking.app</artifactId>
|
||||
<packaging>apk</packaging>
|
||||
|
||||
<properties>
|
||||
<!-- If you change this name, change in app too! -->
|
||||
<additional-deployment-version-file>com.sap.sailing.android.tracking.app.version</additional-deployment-version-file>
|
||||
<!-- passed by buildAndUpdateProduct.sh (parsed from AndroidManifest.xml) -->
|
||||
<app-version>${tracking-app-version}</app-version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<!-- needed on remote repository -->
|
||||
<dependency>
|
||||
@@ -97,6 +104,19 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<!-- plugins for generating version file and copying .apk -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-clean-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
+3
-3
@@ -2,7 +2,6 @@ package com.sap.sailing.android.tracking.app.utils;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.preference.PreferenceManager;
|
||||
|
||||
import com.sap.sailing.android.shared.util.PrefUtils;
|
||||
import com.sap.sailing.android.tracking.app.R;
|
||||
@@ -16,7 +15,8 @@ public class AppPreferences {
|
||||
|
||||
public AppPreferences(Context context) {
|
||||
this.context = context;
|
||||
this.preferences = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
//multi process mode so that services read consistent values
|
||||
this.preferences = context.getSharedPreferences(AppPreferences.class.getName(), Context.MODE_MULTI_PROCESS);
|
||||
}
|
||||
|
||||
public String getDeviceIdentifier() {
|
||||
@@ -41,6 +41,6 @@ public class AppPreferences {
|
||||
}
|
||||
|
||||
public void setServerURL(String serverUrl) {
|
||||
preferences.edit().putString(context.getString(R.string.preference_server_url_key), serverUrl).commit();
|
||||
preferences.edit().putString(context.getString(R.string.preference_server_url_key), serverUrl).apply();
|
||||
}
|
||||
}
|
||||
@@ -14,11 +14,10 @@
|
||||
<packaging>apk</packaging>
|
||||
|
||||
<properties>
|
||||
<additional-deployment-dir>../../java/com.sap.sailing.www/apps</additional-deployment-dir>
|
||||
<!-- If you change this name, change in RCApp too! -->
|
||||
<additional-deployment-version-file>com.sap.sailing.racecommittee.app.version</additional-deployment-version-file>
|
||||
<!-- Passed by buildAndUpdateProduct.sh (parsed from AndroidManifest.xml) -->
|
||||
<rc-app-api-version></rc-app-api-version>
|
||||
<!-- passed by buildAndUpdateProduct.sh (parsed from AndroidManifest.xml) -->
|
||||
<app-version>${rc-app-version}</app-version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@@ -119,75 +118,19 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<!-- plugins for generating version file and copying .apk -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>2.8</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-installed</id>
|
||||
<phase>install</phase>
|
||||
<goals>
|
||||
<goal>copy</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>${project.artifactId}</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>${project.packaging}</type>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
<outputDirectory>${additional-deployment-dir}</outputDirectory>
|
||||
<stripVersion>true</stripVersion>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<version>1.3</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>generate-version</id>
|
||||
<phase>install</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<tasks>
|
||||
<property name="target.dir" value="${additional-deployment-dir}" />
|
||||
<property name="target.name" value="${additional-deployment-version-file}" />
|
||||
|
||||
<echo file="${target.dir}/${target.name}" message="${project.build.finalName}.apk=${rc-app-api-version}" />
|
||||
<echo message="Version file generated in ${target.dir}/${target.name}." />
|
||||
</tasks>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-clean-plugin</artifactId>
|
||||
<version>2.5</version>
|
||||
<configuration>
|
||||
<filesets>
|
||||
<fileset>
|
||||
<directory>${additional-deployment-dir}</directory>
|
||||
<includes>
|
||||
<include>${project.build.finalName}.apk</include>
|
||||
<include>${additional-deployment-version-file}</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<exclude>*.gitignore</exclude>
|
||||
</excludes>
|
||||
<followSymlinks>false</followSymlinks>
|
||||
</fileset>
|
||||
</filesets>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -17,6 +17,15 @@
|
||||
<module>com.sap.sailing.android.shared</module>
|
||||
<module>com.sap.sailing.android.tracking.app</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
<!-- used to copy android apps to the static web dir (auto-update functionality) -->
|
||||
<!-- relative dir as seen from the child modules -->
|
||||
<additional-deployment-dir>../../java/com.sap.sailing.www/apps</additional-deployment-dir>
|
||||
<!-- redefine in child poms -->
|
||||
<additional-deployment-version-file></additional-deployment-version-file>
|
||||
<app-version></app-version>
|
||||
</properties>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
@@ -46,6 +55,74 @@
|
||||
<version>3.8.0</version>
|
||||
<extensions>true</extensions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>2.8</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-installed</id>
|
||||
<phase>install</phase>
|
||||
<goals>
|
||||
<goal>copy</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>${project.artifactId}</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>${project.packaging}</type>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
<outputDirectory>${additional-deployment-dir}</outputDirectory>
|
||||
<stripVersion>true</stripVersion>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<version>1.3</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>generate-version</id>
|
||||
<phase>install</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<tasks>
|
||||
<property name="target.dir" value="${additional-deployment-dir}" />
|
||||
<property name="target.name" value="${additional-deployment-version-file}" />
|
||||
|
||||
<echo file="${target.dir}/${target.name}" message="${project.build.finalName}.apk=${app-version}" />
|
||||
<echo message="Version file generated in ${target.dir}/${target.name}." />
|
||||
</tasks>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-clean-plugin</artifactId>
|
||||
<version>2.5</version>
|
||||
<configuration>
|
||||
<filesets>
|
||||
<fileset>
|
||||
<directory>${additional-deployment-dir}</directory>
|
||||
<includes>
|
||||
<include>${project.build.finalName}.apk</include>
|
||||
<include>${additional-deployment-version-file}</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<exclude>*.gitignore</exclude>
|
||||
</excludes>
|
||||
<followSymlinks>false</followSymlinks>
|
||||
</fileset>
|
||||
</filesets>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
|
||||
Reference in new issue
Block a user