diff --git a/.gitignore b/.gitignore index 29a3a50..24476c5 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,7 @@ migrate_working_dir/ .dart_tool/ .flutter-plugins .flutter-plugins-dependencies +.packages .pub-cache/ .pub/ /build/ diff --git a/.metadata b/.metadata index 32dc8a5..e537e4b 100644 --- a/.metadata +++ b/.metadata @@ -1,11 +1,11 @@ # This file tracks properties of this Flutter project. # Used by Flutter tool to assess capabilities and perform upgrades etc. # -# This file should be version controlled and should not be manually edited. +# This file should be version controlled. version: - revision: "300451adae589accbece3490f4396f10bdf15e6e" - channel: "stable" + revision: f9ad42a32d7e116f321569ec118416f981806151 + channel: master project_type: app @@ -13,26 +13,26 @@ project_type: app migration: platforms: - platform: root - create_revision: 300451adae589accbece3490f4396f10bdf15e6e - base_revision: 300451adae589accbece3490f4396f10bdf15e6e + create_revision: f9ad42a32d7e116f321569ec118416f981806151 + base_revision: f9ad42a32d7e116f321569ec118416f981806151 - platform: android - create_revision: 300451adae589accbece3490f4396f10bdf15e6e - base_revision: 300451adae589accbece3490f4396f10bdf15e6e + create_revision: f9ad42a32d7e116f321569ec118416f981806151 + base_revision: f9ad42a32d7e116f321569ec118416f981806151 - platform: ios - create_revision: 300451adae589accbece3490f4396f10bdf15e6e - base_revision: 300451adae589accbece3490f4396f10bdf15e6e + create_revision: f9ad42a32d7e116f321569ec118416f981806151 + base_revision: f9ad42a32d7e116f321569ec118416f981806151 - platform: linux - create_revision: 300451adae589accbece3490f4396f10bdf15e6e - base_revision: 300451adae589accbece3490f4396f10bdf15e6e + create_revision: f9ad42a32d7e116f321569ec118416f981806151 + base_revision: f9ad42a32d7e116f321569ec118416f981806151 - platform: macos - create_revision: 300451adae589accbece3490f4396f10bdf15e6e - base_revision: 300451adae589accbece3490f4396f10bdf15e6e + create_revision: f9ad42a32d7e116f321569ec118416f981806151 + base_revision: f9ad42a32d7e116f321569ec118416f981806151 - platform: web - create_revision: 300451adae589accbece3490f4396f10bdf15e6e - base_revision: 300451adae589accbece3490f4396f10bdf15e6e + create_revision: f9ad42a32d7e116f321569ec118416f981806151 + base_revision: f9ad42a32d7e116f321569ec118416f981806151 - platform: windows - create_revision: 300451adae589accbece3490f4396f10bdf15e6e - base_revision: 300451adae589accbece3490f4396f10bdf15e6e + create_revision: f9ad42a32d7e116f321569ec118416f981806151 + base_revision: f9ad42a32d7e116f321569ec118416f981806151 # User provided section diff --git a/README.md b/README.md index b22afcf..f729acc 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,3 @@ -# Werwolf - Flutter App +# werwolf -## Beschreibung -Die "Werwolf" Flutter App ist ein Projekt, das im Rahmen eines Gruppenprojekts von David Miller und Yusuf Can Özdemirkan entwickelt wurde. Das Ziel der App ist es, das bekannte Partyspiel "Werwolf" digital zu imitieren und eine benutzerfreundliche Plattform für Spieler bereitzustellen, um das Spiel ohne komplizierte Anmeldungen oder Einstellungen zu genießen. - -## Funktionalitäten -- **Anmeldungsfreier Zugang**: Spieler müssen sich nicht anmelden, sondern können direkt über ein Formular mit mehreren Feldern teilnehmen. -- **Spielerregistrierung**: Das Formular ermöglicht es Spielern, sich einzutragen, wobei eine beliebige Anzahl von Spielern möglich ist. (Ab 6 Spieler) -- **Konfiguration der Spielrunde**: Vor Beginn des Spiels können Konfigurationen vorgenommen werden, wie die Anzahl und Art der speziellen Rollen im Spiel. -- **Enthüllung der Rollen**: Nachdem alle Spieler eingetragen sind und die Konfigurationen abgeschlossen sind, wird der Name der ersten Person angezeigt. Durch Anklicken der Karte wird dann die Rolle dieser Person aufgedeckt. Dieser Vorgang wird für jede Person wiederholt, bis alle Spieler und ihre Rollen angezeigt wurden. -- **Spielaktionen**: Die App bietet Funktionen, um den Tod von Spielern festzulegen und andere Spielaktionen durchzuführen. - -## Gitty Repository -Das Projekt wird auf GitLab gehostet. Hier ist der Link zum Repository: -[Gitty Repository](https://gitty.informatik.hs-mannheim.de/2011708/cpd_David_und_Yusuf) - -## Kontakt -Für Fragen, Feedback oder Unterstützung kontaktieren Sie bitte: -- Yusuf Can Özdemirkan, 1813055: yusufcan.oezdemirkan@stud.hs-mannheim.de -- David Miller, 2011708: 2011708@stud.hs-mannheim.de +A new Flutter project. diff --git a/analysis_options.yaml b/analysis_options.yaml index 0d29021..f9b3034 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1,28 +1 @@ -# This file configures the analyzer, which statically analyzes Dart code to -# check for errors, warnings, and lints. -# -# The issues identified by the analyzer are surfaced in the UI of Dart-enabled -# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be -# invoked from the command line by running `flutter analyze`. - -# The following line activates a set of recommended lints for Flutter apps, -# packages, and plugins designed to encourage good coding practices. include: package:flutter_lints/flutter.yaml - -linter: - # The lint rules applied to this project can be customized in the - # section below to disable rules from the `package:flutter_lints/flutter.yaml` - # included above or to enable additional rules. A list of all available lints - # and their documentation is published at https://dart.dev/lints. - # - # Instead of disabling a lint rule for the entire project in the - # section below, it can also be suppressed for a single line of code - # or a specific dart file by using the `// ignore: name_of_lint` and - # `// ignore_for_file: name_of_lint` syntax on the line or in the file - # producing the lint. - rules: - # avoid_print: false # Uncomment to disable the `avoid_print` rule - # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options diff --git a/android/app/build.gradle b/android/app/build.gradle index 1667672..7dae480 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -1,9 +1,3 @@ -plugins { - id "com.android.application" - id "kotlin-android" - id "dev.flutter.flutter-gradle-plugin" -} - def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { @@ -12,6 +6,11 @@ if (localPropertiesFile.exists()) { } } +def flutterRoot = localProperties.getProperty('flutter.sdk') +if (flutterRoot == null) { + throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") +} + def flutterVersionCode = localProperties.getProperty('flutter.versionCode') if (flutterVersionCode == null) { flutterVersionCode = '1' @@ -22,9 +21,12 @@ if (flutterVersionName == null) { flutterVersionName = '1.0' } +apply plugin: 'com.android.application' +apply plugin: 'kotlin-android' +apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" + android { - namespace "com.example.flutter_application_cpd" - compileSdk flutter.compileSdkVersion + compileSdkVersion flutter.compileSdkVersion ndkVersion flutter.ndkVersion compileOptions { @@ -42,7 +44,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.flutter_application_cpd" + applicationId "com.example.werwolf" // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. minSdkVersion flutter.minSdkVersion @@ -64,4 +66,6 @@ flutter { source '../..' } -dependencies {} +dependencies { + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" +} diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index 399f698..d4876ac 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -1,4 +1,5 @@ - + - - - - - - diff --git a/android/app/src/main/kotlin/com/example/flutter_application_cpd/MainActivity.kt b/android/app/src/main/kotlin/com/example/flutter_application_cpd/MainActivity.kt deleted file mode 100644 index cc279c1..0000000 --- a/android/app/src/main/kotlin/com/example/flutter_application_cpd/MainActivity.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.example.flutter_application_cpd - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity: FlutterActivity() diff --git a/android/app/src/main/kotlin/com/example/werwolf/MainActivity.kt b/android/app/src/main/kotlin/com/example/werwolf/MainActivity.kt new file mode 100644 index 0000000..287cf3d --- /dev/null +++ b/android/app/src/main/kotlin/com/example/werwolf/MainActivity.kt @@ -0,0 +1,6 @@ +package com.example.werwolf + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() { +} diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml index 399f698..d4876ac 100644 --- a/android/app/src/profile/AndroidManifest.xml +++ b/android/app/src/profile/AndroidManifest.xml @@ -1,4 +1,5 @@ - + - + - flutter_application_cpd + werwolf diff --git a/web/manifest.json b/web/manifest.json index 84d602c..a6be853 100644 --- a/web/manifest.json +++ b/web/manifest.json @@ -1,6 +1,6 @@ { - "name": "flutter_application_cpd", - "short_name": "flutter_application_cpd", + "name": "werwolf", + "short_name": "werwolf", "start_url": ".", "display": "standalone", "background_color": "#0175C2", diff --git a/windows/CMakeLists.txt b/windows/CMakeLists.txt index e8c0e94..147632c 100644 --- a/windows/CMakeLists.txt +++ b/windows/CMakeLists.txt @@ -1,14 +1,14 @@ # Project-level configuration. cmake_minimum_required(VERSION 3.14) -project(flutter_application_cpd LANGUAGES CXX) +project(werwolf LANGUAGES CXX) # The name of the executable created for the application. Change this to change # the on-disk name of your application. -set(BINARY_NAME "flutter_application_cpd") +set(BINARY_NAME "werwolf") # Explicitly opt in to modern CMake behaviors to avoid warnings with recent # versions of CMake. -cmake_policy(VERSION 3.14...3.25) +cmake_policy(SET CMP0063 NEW) # Define build configuration option. get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) @@ -87,12 +87,6 @@ if(PLUGIN_BUNDLED_LIBRARIES) COMPONENT Runtime) endif() -# Copy the native assets provided by the build.dart from all packages. -set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/windows/") -install(DIRECTORY "${NATIVE_ASSETS_DIR}" - DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) - # Fully re-copy the assets directory on each build to avoid having stale files # from a previous install. set(FLUTTER_ASSET_DIR_NAME "flutter_assets") diff --git a/windows/flutter/CMakeLists.txt b/windows/flutter/CMakeLists.txt index 903f489..930d207 100644 --- a/windows/flutter/CMakeLists.txt +++ b/windows/flutter/CMakeLists.txt @@ -10,11 +10,6 @@ include(${EPHEMERAL_DIR}/generated_config.cmake) # https://github.com/flutter/flutter/issues/57146. set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") -# Set fallback configurations for older versions of the flutter tool. -if (NOT DEFINED FLUTTER_TARGET_PLATFORM) - set(FLUTTER_TARGET_PLATFORM "windows-x64") -endif() - # === Flutter Library === set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") @@ -97,7 +92,7 @@ add_custom_command( COMMAND ${CMAKE_COMMAND} -E env ${FLUTTER_TOOL_ENVIRONMENT} "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" - ${FLUTTER_TARGET_PLATFORM} $ + windows-x64 $ VERBATIM ) add_custom_target(flutter_assemble DEPENDS diff --git a/windows/runner/Runner.rc b/windows/runner/Runner.rc index 1ec97e2..9852ac6 100644 --- a/windows/runner/Runner.rc +++ b/windows/runner/Runner.rc @@ -90,12 +90,12 @@ BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "com.example" "\0" - VALUE "FileDescription", "flutter_application_cpd" "\0" + VALUE "FileDescription", "werwolf" "\0" VALUE "FileVersion", VERSION_AS_STRING "\0" - VALUE "InternalName", "flutter_application_cpd" "\0" + VALUE "InternalName", "werwolf" "\0" VALUE "LegalCopyright", "Copyright (C) 2024 com.example. All rights reserved." "\0" - VALUE "OriginalFilename", "flutter_application_cpd.exe" "\0" - VALUE "ProductName", "flutter_application_cpd" "\0" + VALUE "OriginalFilename", "werwolf.exe" "\0" + VALUE "ProductName", "werwolf" "\0" VALUE "ProductVersion", VERSION_AS_STRING "\0" END END diff --git a/windows/runner/flutter_window.cpp b/windows/runner/flutter_window.cpp index 955ee30..b25e363 100644 --- a/windows/runner/flutter_window.cpp +++ b/windows/runner/flutter_window.cpp @@ -31,11 +31,6 @@ bool FlutterWindow::OnCreate() { this->Show(); }); - // Flutter can complete the first frame before the "show window" callback is - // registered. The following call ensures a frame is pending to ensure the - // window is shown. It is a no-op if the first frame hasn't completed yet. - flutter_controller_->ForceRedraw(); - return true; } diff --git a/windows/runner/main.cpp b/windows/runner/main.cpp index 8ad8c13..767a19c 100644 --- a/windows/runner/main.cpp +++ b/windows/runner/main.cpp @@ -27,7 +27,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, FlutterWindow window(project); Win32Window::Point origin(10, 10); Win32Window::Size size(1280, 720); - if (!window.Create(L"flutter_application_cpd", origin, size)) { + if (!window.Create(L"werwolf", origin, size)) { return EXIT_FAILURE; } window.SetQuitOnClose(true);