From 070d01b9e1286d9204886ba361261655f81bebf4 Mon Sep 17 00:00:00 2001 From: iliyan-kostov Date: Sun, 21 Sep 2025 16:02:38 +0200 Subject: [PATCH 1/2] fix: flake checker action key M .github/workflows/flake-test.yml M pubspec.yaml --- .github/workflows/flake-test.yml | 4 ++-- pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/flake-test.yml b/.github/workflows/flake-test.yml index 2db79c5..6957f32 100644 --- a/.github/workflows/flake-test.yml +++ b/.github/workflows/flake-test.yml @@ -16,7 +16,7 @@ jobs: - uses: DeterminateSystems/nix-installer-action@v20 - uses: cachix/cachix-action@v16 with: - name: zz-android + name: zz-flutter-client authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" - uses: DeterminateSystems/flake-checker-action@v12 @@ -34,7 +34,7 @@ jobs: - uses: DeterminateSystems/nix-installer-action@v20 - uses: cachix/cachix-action@v16 with: - name: zz-android + name: zz-flutter-client authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" - uses: DeterminateSystems/update-flake-lock@v27 with: diff --git a/pubspec.yaml b/pubspec.yaml index b863136..718c071 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: zprofile -description: "A new Flutter project." +description: "Android application for interacting with ZProfile" # The following line prevents the package from being accidentally published to # pub.dev using `flutter pub publish`. This is preferred for private packages. publish_to: "none" # Remove this line if you wish to publish to pub.dev From 248c821e599af44ad932e7ceba0b6ef42fdd5035 Mon Sep 17 00:00:00 2001 From: iliyan-kostov Date: Sun, 21 Sep 2025 16:58:24 +0200 Subject: [PATCH 2/2] refactor: code M .github/workflows/security-scan.yaml M android/app/build.gradle.kts R android/app/src/main/kotlin/com/example/zprofile/MainActivity.kt -> android/app/src/main/kotlin/com/zprofile/client/MainActivity.kt M flake.nix feat: added config M android/app/build.gradle.kts M flake.nix A lib/view/LoginView.dart fix: init issue M android/app/build.gradle.kts feat: added gitkeep A lib/controller/.gitkeep A lib/entity/.gitkeep A lib/repository/.gitkeep A lib/service/.gitkeep A lib/viewmodel/.gitkeep --- .github/workflows/security-scan.yaml | 5 +++-- android/app/build.gradle.kts | 5 +++-- .../{example/zprofile => zprofile/client}/MainActivity.kt | 2 +- flake.nix | 4 ++-- lib/controller/.gitkeep | 1 + lib/entity/.gitkeep | 1 + lib/repository/.gitkeep | 1 + lib/service/.gitkeep | 1 + lib/view/LoginView.dart | 1 + lib/viewmodel/.gitkeep | 1 + 10 files changed, 15 insertions(+), 7 deletions(-) rename android/app/src/main/kotlin/com/{example/zprofile => zprofile/client}/MainActivity.kt (76%) create mode 100644 lib/controller/.gitkeep create mode 100644 lib/entity/.gitkeep create mode 100644 lib/repository/.gitkeep create mode 100644 lib/service/.gitkeep create mode 100644 lib/view/LoginView.dart create mode 100644 lib/viewmodel/.gitkeep diff --git a/.github/workflows/security-scan.yaml b/.github/workflows/security-scan.yaml index 587417e..7305570 100644 --- a/.github/workflows/security-scan.yaml +++ b/.github/workflows/security-scan.yaml @@ -7,6 +7,7 @@ on: env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + REPOSITORY: flutter-client jobs: checkout: @@ -23,7 +24,7 @@ jobs: - name: Save repo to artifact uses: actions/upload-artifact@v4 with: - name: flutter-client + name: "${{ env.REPOSITORY }}" path: . overwrite: true if-no-files-found: error @@ -41,7 +42,7 @@ jobs: - name: Download repo artifact uses: actions/download-artifact@v5 with: - name: flutter-client + name: "${{ env.REPOSITORY }}" path: . - name: GitGuardian scan diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index ee17a42..6ede07b 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -7,7 +7,7 @@ plugins { } android { - namespace = "com.example.zprofile" + namespace = "com.zprofile.client" compileSdk = flutter.compileSdkVersion // ndkVersion = flutter.ndkVersion @@ -23,7 +23,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID // (https://developer.android.com/studio/build/application-id.html). - applicationId = "com.example.zprofile" + applicationId = "com.zprofile.client" // You can update the following values to match your application needs. // For more information, see: https://flutter.dev/to/review-gradle-config. // minSdk = flutter.minSdkVersion @@ -33,6 +33,7 @@ android { minSdk = 24 targetSdk = 36 buildToolsVersion = "36.0.0" + manifestPlaceholders["appAuthRedirectScheme"] = "zprofile" } buildTypes { diff --git a/android/app/src/main/kotlin/com/example/zprofile/MainActivity.kt b/android/app/src/main/kotlin/com/zprofile/client/MainActivity.kt similarity index 76% rename from android/app/src/main/kotlin/com/example/zprofile/MainActivity.kt rename to android/app/src/main/kotlin/com/zprofile/client/MainActivity.kt index 3f82973..b87deac 100644 --- a/android/app/src/main/kotlin/com/example/zprofile/MainActivity.kt +++ b/android/app/src/main/kotlin/com/zprofile/client/MainActivity.kt @@ -1,4 +1,4 @@ -package com.example.zprofile +package com.zprofile.client import io.flutter.embedding.android.FlutterActivity diff --git a/flake.nix b/flake.nix index 3c9c291..5017b03 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,5 @@ { - description = "Android client"; + description = "Mobile application for ZProfile"; inputs = { devenv-root = { @@ -44,7 +44,7 @@ }; devenv.shells.default = { - name = "Android client"; + name = "Mobile application for ZProfile"; languages.kotlin.enable = true; secretspec.enable = true; diff --git a/lib/controller/.gitkeep b/lib/controller/.gitkeep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/lib/controller/.gitkeep @@ -0,0 +1 @@ + diff --git a/lib/entity/.gitkeep b/lib/entity/.gitkeep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/lib/entity/.gitkeep @@ -0,0 +1 @@ + diff --git a/lib/repository/.gitkeep b/lib/repository/.gitkeep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/lib/repository/.gitkeep @@ -0,0 +1 @@ + diff --git a/lib/service/.gitkeep b/lib/service/.gitkeep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/lib/service/.gitkeep @@ -0,0 +1 @@ + diff --git a/lib/view/LoginView.dart b/lib/view/LoginView.dart new file mode 100644 index 0000000..f70d13b --- /dev/null +++ b/lib/view/LoginView.dart @@ -0,0 +1 @@ +class LoginView {} diff --git a/lib/viewmodel/.gitkeep b/lib/viewmodel/.gitkeep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/lib/viewmodel/.gitkeep @@ -0,0 +1 @@ +