Update (Vu_homePage): Mise en place de CSharpier

pull/2/head
Louis DUFOUR 2 years ago
parent 22b5e38c16
commit 923b58835c

@ -19,7 +19,6 @@ steps:
- dotnet-csharpier --check . # Verifie le formatage
- dotnet-csharpier --write . # Applique le formatage
- name: build
image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dotnet7-maui:latest
commandes:
@ -51,12 +50,11 @@ steps:
- dotnet sonarscanner begin /k:$${project_key} /d:sonar.host.url=$${sonar_host} /d:sonar.coverageReportPaths="coveragereport/SonarQube.xml" /d:sonar.coverage.exclusions=$${coverage_exclusions} /d:sonar.login=$${sonar_token}
- dotnet build BookApp.sln -c Release --no-restore /p:AndroidSdkDirectory=$ANDROID_SDK_ROOT -property:Aapt2ToolPath=$ANDROID_SDK_ROOT/build-tools/33.0.0
- dotnet test BookApp.sln --logger trx --no-restore /p:AndroidSdkDirectory=$ANDROID_SDK_ROOT -property:Aapt2ToolPath=$ANDROID_SDK_ROOT/build-tools/33.0.0 /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage"
- reportgenerator -reports:"**/coverage.cobertura.xml" -reporttypes:SonarQube -targetdir:"coveragereport"
#- reportgenerator -reports:"**/coverage.cobertura.xml" -reporttypes:SonarQube -targetdir:"coveragereport"
- dotnet publish BookApp/BookApp.csproj -c Release --no-restore -o $CI_PROJECT_DIR/build/release -f:net7.0-android /p:AndroidSdkDirectory=/usr/lib/android-sdk
- dotnet sonarscanner end /d:sonar.login=$${sonar_token}
depends_on: [build]
#- name: docs
#- name: deploy

@ -9,4 +9,4 @@
MainPage = new AppShell();
}
}
}
}

@ -8,4 +8,4 @@
Routing.RegisterRoute(nameof(Tous), typeof(Tous));
}
}
}
}

@ -8,7 +8,12 @@ namespace BookApp
{
public string Name { get; set; }
public string Icone { get; set; }
public ObjetTemp(string name, string icone) { Name = name; Icone = icone; }
public ObjetTemp(string name, string icone)
{
Name = name;
Icone = icone;
}
}
public ObservableCollection<ObjetTemp> MyCollections { get; set; }
@ -30,11 +35,10 @@ namespace BookApp
};
BindingContext = this;
}
async void OnButtonClicked(object sender, EventArgs args)
{
await Shell.Current.GoToAsync(nameof(Tous));
}
}
}
}

@ -16,10 +16,10 @@ namespace BookApp
});
#if DEBUG
builder.Logging.AddDebug();
builder.Logging.AddDebug();
#endif
return builder.Build();
}
}
}
}

@ -4,8 +4,6 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BookApp
{
[XamlCompilation(XamlCompilationOptions.Compile)]
@ -16,4 +14,4 @@ namespace BookApp
InitializeComponent();
}
}
}
}

@ -4,8 +4,15 @@ using Android.OS;
namespace BookApp
{
[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
public class MainActivity : MauiAppCompatActivity
{
}
}
[Activity(
Theme = "@style/Maui.SplashTheme",
MainLauncher = true,
ConfigurationChanges = ConfigChanges.ScreenSize
| ConfigChanges.Orientation
| ConfigChanges.UiMode
| ConfigChanges.ScreenLayout
| ConfigChanges.SmallestScreenSize
| ConfigChanges.Density
)]
public class MainActivity : MauiAppCompatActivity { }
}

@ -7,10 +7,8 @@ namespace BookApp
public class MainApplication : MauiApplication
{
public MainApplication(IntPtr handle, JniHandleOwnership ownership)
: base(handle, ownership)
{
}
: base(handle, ownership) { }
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}
}
}

@ -7,4 +7,4 @@ namespace BookApp
{
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}
}
}

@ -13,4 +13,4 @@ namespace BookApp
UIApplication.Main(args, null, typeof(AppDelegate));
}
}
}
}

@ -14,4 +14,4 @@ namespace BookApp
app.Run(args);
}
}
}
}

@ -21,4 +21,4 @@ namespace BookApp.WinUI
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}
}
}

@ -7,4 +7,4 @@ namespace BookApp
{
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}
}
}

@ -13,4 +13,4 @@ namespace BookApp
UIApplication.Main(args, null, typeof(AppDelegate));
}
}
}
}

Loading…
Cancel
Save