mirror of
https://gitlab.com/fabinfra/fabaccess/borepin.git
synced 2025-06-11 02:53:23 +02:00
Added: #37
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@ -78,6 +78,7 @@
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Services\PreferenceStorageService.cs" />
|
||||
<Compile Include="Services\SecretStorage.cs" />
|
||||
<Compile Include="Services\VersioningService.cs" />
|
||||
<Compile Include="SplashActivity.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@ -188,4 +189,4 @@
|
||||
<XmlPoke XmlInputPath="Properties\AndroidManifest.xml" Namespaces="<Namespace Prefix='android' Uri='http://schemas.android.com/apk/res/android' />" Query="manifest/@android:versionCode" Value="$(CI_PIPELINE_ID)" />
|
||||
<XmlPoke XmlInputPath="Properties\AndroidManifest.xml" Namespaces="<Namespace Prefix='android' Uri='http://schemas.android.com/apk/res/android' />" Query="manifest/@android:versionName" Value="$(CI_COMMIT_TAG.SubString(1))" />
|
||||
</Target>
|
||||
</Project>
|
||||
</Project>
|
@ -1,5 +1,6 @@
|
||||
using Borepin.Droid.Services;
|
||||
using Borepin.Service.Storage;
|
||||
using Borepin.Service.Versioning;
|
||||
using Prism;
|
||||
using Prism.Ioc;
|
||||
|
||||
@ -11,6 +12,7 @@ namespace Borepin.Droid
|
||||
{
|
||||
containerRegistry.Register<IPreferenceStorageService, PreferenceStorageService>();
|
||||
containerRegistry.Register<ISecretStorageService, SecretStorage>();
|
||||
containerRegistry.Register<IVersioningService, VersioningService>();
|
||||
}
|
||||
}
|
||||
}
|
30
Borepin/Borepin.Android/Services/VersioningService.cs
Normal file
30
Borepin/Borepin.Android/Services/VersioningService.cs
Normal file
@ -0,0 +1,30 @@
|
||||
using Borepin.Service.Versioning;
|
||||
using Xamarin.Essentials;
|
||||
|
||||
namespace Borepin.Droid.Services
|
||||
{
|
||||
public class VersioningService : IVersioningService
|
||||
{
|
||||
#region Constructors
|
||||
public VersioningService()
|
||||
{
|
||||
VersionTracking.Track();
|
||||
}
|
||||
#endregion
|
||||
public string CurrentBuild
|
||||
{
|
||||
get
|
||||
{
|
||||
return VersionTracking.CurrentBuild;
|
||||
}
|
||||
}
|
||||
|
||||
public string CurrentVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return VersionTracking.CurrentVersion;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user