diff --git a/.gitignore b/.gitignore index f4c3b0c..a82d757 100644 --- a/.gitignore +++ b/.gitignore @@ -153,3 +153,6 @@ google-services.json # Android Profiling *.hprof +# Staged build files for distribution. +*.linux-bundle.zip +release/* diff --git a/README.md b/README.md index 7c50514..1a775c4 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# flutter_sunset_alarm +# sunset_alarm Android app to set off an alarm a set number of hours before sunset if enabled manually or if the user has wandered a set distance away from the sunset diff --git a/analysis_options.yaml b/analysis_options.yaml index f9b3034..743e05a 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1 +1,10 @@ +analyzer: + exclude: + - build/** + - android/** + - ios/** + - web/** + - windows/** + - macos/** + - linux/** include: package:flutter_lints/flutter.yaml diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index 79fd38f..aafc64c 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -1,27 +1,36 @@ +import org.jetbrains.kotlin.gradle.dsl.JvmTarget + plugins { id("com.android.application") - id("kotlin-android") + + // This supposedly needs removed in Gradle/AGP 9 but works fine. + id("org.jetbrains.kotlin.android") // id("kotlin-android") + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. id("dev.flutter.flutter-gradle-plugin") } android { - namespace = "com.example.flutter_sunset_alarm" + namespace = "com.hyperling.sunset_alarm" compileSdk = flutter.compileSdkVersion ndkVersion = flutter.ndkVersion compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + isCoreLibraryDesugaringEnabled = true + targetCompatibility = JavaVersion.VERSION_17 + sourceCompatibility = JavaVersion.VERSION_17 } - kotlinOptions { - jvmTarget = JavaVersion.VERSION_11.toString() + // This supposedly needs removed in Gradle/AGP 9, but then uses 21 and fails to build. + kotlin { + compilerOptions { + jvmTarget.set(JvmTarget.JVM_17) + } } defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId = "com.example.flutter_sunset_alarm" + applicationId = "com.hyperling.sunset_alarm" // 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 @@ -39,6 +48,10 @@ android { } } +dependencies { + coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.5") +} + flutter { source = "../.." } diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index e0d0521..667aefb 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,6 +1,34 @@ - + + + + + + + + + + + + + + + + + + + + + + - + - flutter_sunset_alarm + sunset_alarm diff --git a/web/manifest.json b/web/manifest.json index 593da7b..effe87b 100644 --- a/web/manifest.json +++ b/web/manifest.json @@ -1,6 +1,6 @@ { - "name": "flutter_sunset_alarm", - "short_name": "flutter_sunset_alarm", + "name": "sunset_alarm", + "short_name": "sunset_alarm", "start_url": ".", "display": "standalone", "background_color": "#0175C2", diff --git a/windows/CMakeLists.txt b/windows/CMakeLists.txt index 203261d..17d95a6 100644 --- a/windows/CMakeLists.txt +++ b/windows/CMakeLists.txt @@ -1,10 +1,10 @@ # Project-level configuration. cmake_minimum_required(VERSION 3.14) -project(flutter_sunset_alarm LANGUAGES CXX) +project(sunset_alarm 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_sunset_alarm") +set(BINARY_NAME "sunset_alarm") # Explicitly opt in to modern CMake behaviors to avoid warnings with recent # versions of CMake. diff --git a/windows/runner/Runner.rc b/windows/runner/Runner.rc index e86faf0..0a8985e 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_sunset_alarm" "\0" + VALUE "FileDescription", "sunset_alarm" "\0" VALUE "FileVersion", VERSION_AS_STRING "\0" - VALUE "InternalName", "flutter_sunset_alarm" "\0" + VALUE "InternalName", "sunset_alarm" "\0" VALUE "LegalCopyright", "Copyright (C) 2025 com.example. All rights reserved." "\0" - VALUE "OriginalFilename", "flutter_sunset_alarm.exe" "\0" - VALUE "ProductName", "flutter_sunset_alarm" "\0" + VALUE "OriginalFilename", "sunset_alarm.exe" "\0" + VALUE "ProductName", "sunset_alarm" "\0" VALUE "ProductVersion", VERSION_AS_STRING "\0" END END diff --git a/windows/runner/main.cpp b/windows/runner/main.cpp index ee9fc4c..9059525 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_sunset_alarm", origin, size)) { + if (!window.Create(L"sunset_alarm", origin, size)) { return EXIT_FAILURE; } window.SetQuitOnClose(true);