diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-17 20:18:35 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-17 20:18:35 +0300 |
| commit | 5b1cfb8852009bf3c4ac56ea5ca833fff992864d (patch) | |
| tree | 5d8dda332f9de2db47b7c508bbd9e7cb241e3048 /player-android | |
| parent | c11b7c145fc1b2db6c1ed29a7abd739d0f6cbf3b (diff) | |
Complete player-android Flutter scaffold
Diffstat (limited to 'player-android')
18 files changed, 231 insertions, 0 deletions
diff --git a/player-android/.metadata b/player-android/.metadata new file mode 100644 index 0000000..0658d41 --- /dev/null +++ b/player-android/.metadata @@ -0,0 +1,29 @@ +# 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. + +version: + revision: "00b0c91f06209d9e4a41f71b7a512d6eb3b9c694" + channel: "stable" + +project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: 00b0c91f06209d9e4a41f71b7a512d6eb3b9c694 + base_revision: 00b0c91f06209d9e4a41f71b7a512d6eb3b9c694 + - platform: android + create_revision: 00b0c91f06209d9e4a41f71b7a512d6eb3b9c694 + base_revision: 00b0c91f06209d9e4a41f71b7a512d6eb3b9c694 + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' diff --git a/player-android/analysis_options.yaml b/player-android/analysis_options.yaml new file mode 100644 index 0000000..4980b8a --- /dev/null +++ b/player-android/analysis_options.yaml @@ -0,0 +1,11 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The analyzer can be invoked from the command line by running +# `flutter analyze`. + +include: package:flutter_lints/flutter.yaml + +linter: + rules: + # prefer_single_quotes: true diff --git a/player-android/android/.gitignore b/player-android/android/.gitignore new file mode 100644 index 0000000..be3943c --- /dev/null +++ b/player-android/android/.gitignore @@ -0,0 +1,14 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java +.cxx/ + +# Remember to never publicly share your keystore. +# See https://flutter.dev/to/reference-keystore +key.properties +**/*.keystore +**/*.jks diff --git a/player-android/android/app/build.gradle.kts b/player-android/android/app/build.gradle.kts new file mode 100644 index 0000000..fee91e7 --- /dev/null +++ b/player-android/android/app/build.gradle.kts @@ -0,0 +1,38 @@ +plugins { + id("com.android.application") + id("kotlin-android") + id("dev.flutter.flutter-gradle-plugin") +} + +android { + namespace = "zone.foo.player_android" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_17.toString() + } + + defaultConfig { + applicationId = "zone.foo.player_android" + minSdk = flutter.minSdkVersion + targetSdk = flutter.targetSdkVersion + versionCode = flutter.versionCode + versionName = flutter.versionName + } + + buildTypes { + release { + signingConfig = signingConfigs.getByName("debug") + } + } +} + +flutter { + source = "../.." +} diff --git a/player-android/android/app/src/debug/AndroidManifest.xml b/player-android/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000..6088b5b --- /dev/null +++ b/player-android/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,4 @@ +<manifest xmlns:android="http://schemas.android.com/apk/res/android"> + <!-- Required by the Flutter tool for debugging, hot reload, and breakpoints. --> + <uses-permission android:name="android.permission.INTERNET" /> +</manifest> diff --git a/player-android/android/app/src/main/AndroidManifest.xml b/player-android/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..4ca1088 --- /dev/null +++ b/player-android/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,29 @@ +<manifest xmlns:android="http://schemas.android.com/apk/res/android"> + <uses-permission android:name="android.permission.INTERNET" /> + + <application + android:label="Player" + android:name="${applicationName}" + android:icon="@drawable/ic_launcher"> + <activity + android:name=".MainActivity" + android:exported="true" + android:launchMode="singleTop" + android:taskAffinity="" + android:theme="@style/LaunchTheme" + android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" + android:hardwareAccelerated="true" + android:windowSoftInputMode="adjustResize"> + <meta-data + android:name="io.flutter.embedding.android.NormalTheme" + android:resource="@style/NormalTheme" /> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> + <meta-data + android:name="flutterEmbedding" + android:value="2" /> + </application> +</manifest> diff --git a/player-android/android/app/src/main/kotlin/zone/foo/player_android/MainActivity.kt b/player-android/android/app/src/main/kotlin/zone/foo/player_android/MainActivity.kt new file mode 100644 index 0000000..e3087ec --- /dev/null +++ b/player-android/android/app/src/main/kotlin/zone/foo/player_android/MainActivity.kt @@ -0,0 +1,5 @@ +package zone.foo.player_android + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity : FlutterActivity() diff --git a/player-android/android/app/src/main/res/drawable-v21/launch_background.xml b/player-android/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000..812458b --- /dev/null +++ b/player-android/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:drawable="?android:colorBackground" /> +</layer-list> diff --git a/player-android/android/app/src/main/res/drawable/ic_launcher.xml b/player-android/android/app/src/main/res/drawable/ic_launcher.xml new file mode 100644 index 0000000..8867c98 --- /dev/null +++ b/player-android/android/app/src/main/res/drawable/ic_launcher.xml @@ -0,0 +1,12 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="48dp" + android:height="48dp" + android:viewportWidth="48" + android:viewportHeight="48"> + <path + android:fillColor="#1565C0" + android:pathData="M4,4h40v40h-40z" /> + <path + android:fillColor="#FFFFFF" + android:pathData="M19,15v18l15,-9z" /> +</vector> diff --git a/player-android/android/app/src/main/res/drawable/launch_background.xml b/player-android/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 0000000..5782842 --- /dev/null +++ b/player-android/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:drawable="@android:color/white" /> +</layer-list> diff --git a/player-android/android/app/src/main/res/values-night/styles.xml b/player-android/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000..c6e7031 --- /dev/null +++ b/player-android/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar"> + <item name="android:windowBackground">@drawable/launch_background</item> + </style> + <style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar"> + <item name="android:windowBackground">?android:colorBackground</item> + </style> +</resources> diff --git a/player-android/android/app/src/main/res/values/styles.xml b/player-android/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..ff81bae --- /dev/null +++ b/player-android/android/app/src/main/res/values/styles.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar"> + <item name="android:windowBackground">@drawable/launch_background</item> + </style> + <style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar"> + <item name="android:windowBackground">?android:colorBackground</item> + </style> +</resources> diff --git a/player-android/android/app/src/profile/AndroidManifest.xml b/player-android/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000..94bf2a8 --- /dev/null +++ b/player-android/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,4 @@ +<manifest xmlns:android="http://schemas.android.com/apk/res/android"> + <!-- Required by the Flutter tool for profiling and hot reload. --> + <uses-permission android:name="android.permission.INTERNET" /> +</manifest> diff --git a/player-android/android/build.gradle.kts b/player-android/android/build.gradle.kts new file mode 100644 index 0000000..ed5f8f2 --- /dev/null +++ b/player-android/android/build.gradle.kts @@ -0,0 +1,25 @@ +allprojects { + repositories { + google() + mavenCentral() + } +} + +val newBuildDir: Directory = + rootProject.layout.buildDirectory + .dir("../../build") + .get() +rootProject.layout.buildDirectory.value(newBuildDir) + +subprojects { + val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name) + project.layout.buildDirectory.value(newSubprojectBuildDir) +} + +subprojects { + project.evaluationDependsOn(":app") +} + +tasks.register<Delete>("clean") { + delete(rootProject.layout.buildDirectory) +} diff --git a/player-android/android/gradle.properties b/player-android/android/gradle.properties new file mode 100644 index 0000000..fbee1d8 --- /dev/null +++ b/player-android/android/gradle.properties @@ -0,0 +1,2 @@ +org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError +android.useAndroidX=true diff --git a/player-android/android/gradle/wrapper/gradle-wrapper.properties b/player-android/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..e4ef43f --- /dev/null +++ b/player-android/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-all.zip diff --git a/player-android/android/settings.gradle.kts b/player-android/android/settings.gradle.kts new file mode 100644 index 0000000..ca7fe06 --- /dev/null +++ b/player-android/android/settings.gradle.kts @@ -0,0 +1,26 @@ +pluginManagement { + val flutterSdkPath = + run { + val properties = java.util.Properties() + file("local.properties").inputStream().use { properties.load(it) } + val flutterSdkPath = properties.getProperty("flutter.sdk") + require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" } + flutterSdkPath + } + + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +plugins { + id("dev.flutter.flutter-plugin-loader") version "1.0.0" + id("com.android.application") version "8.11.1" apply false + id("org.jetbrains.kotlin.android") version "2.2.20" apply false +} + +include(":app") diff --git a/player-android/pubspec.yaml b/player-android/pubspec.yaml index cd4d900..63c98ae 100644 --- a/player-android/pubspec.yaml +++ b/player-android/pubspec.yaml @@ -13,6 +13,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter + flutter_lints: ^3.0.0 flutter: uses-material-design: true |
