diff --git a/examples/flutter/materials_and_textures/android/.gitignore b/examples/flutter/materials_and_textures/android/.gitignore new file mode 100644 index 00000000..be3943c9 --- /dev/null +++ b/examples/flutter/materials_and_textures/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/examples/flutter/materials_and_textures/android/app/.gradle/config.properties b/examples/flutter/materials_and_textures/android/app/.gradle/config.properties new file mode 100644 index 00000000..03ab4904 --- /dev/null +++ b/examples/flutter/materials_and_textures/android/app/.gradle/config.properties @@ -0,0 +1,2 @@ +#Sat Jun 28 14:33:08 SGT 2025 +java.home=/Applications/Android Studio.app/Contents/jbr/Contents/Home diff --git a/examples/flutter/materials_and_textures/android/app/build.gradle.kts b/examples/flutter/materials_and_textures/android/app/build.gradle.kts new file mode 100644 index 00000000..7838f1c6 --- /dev/null +++ b/examples/flutter/materials_and_textures/android/app/build.gradle.kts @@ -0,0 +1,44 @@ +plugins { + id("com.android.application") + 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.materials_and_textures" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId = "com.example.materials_and_textures" + // You can update the following values to match your application needs. + // For more information, see: https://flutter.dev/to/review-gradle-config. + minSdk = 22 + targetSdk = flutter.targetSdkVersion + versionCode = flutter.versionCode + versionName = flutter.versionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig = signingConfigs.getByName("debug") + } + } +} + +flutter { + source = "../.." +} diff --git a/examples/flutter/materials_and_textures/android/app/local.properties b/examples/flutter/materials_and_textures/android/app/local.properties new file mode 100644 index 00000000..b9c0eb5b --- /dev/null +++ b/examples/flutter/materials_and_textures/android/app/local.properties @@ -0,0 +1,8 @@ +## This file must *NOT* be checked into Version Control Systems, +# as it contains information specific to your local configuration. +# +# Location of the SDK. This is only used by Gradle. +# For customization when using a Version Control System, please read the +# header note. +#Sat Jun 28 14:33:08 SGT 2025 +sdk.dir=/Users/nickfisher/Library/Android/sdk diff --git a/examples/flutter/materials_and_textures/android/app/src/debug/AndroidManifest.xml b/examples/flutter/materials_and_textures/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 00000000..399f6981 --- /dev/null +++ b/examples/flutter/materials_and_textures/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/examples/flutter/materials_and_textures/android/app/src/main/AndroidManifest.xml b/examples/flutter/materials_and_textures/android/app/src/main/AndroidManifest.xml new file mode 100644 index 00000000..f420ed34 --- /dev/null +++ b/examples/flutter/materials_and_textures/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/flutter/materials_and_textures/android/app/src/main/kotlin/com/example/materials_and_textures/MainActivity.kt b/examples/flutter/materials_and_textures/android/app/src/main/kotlin/com/example/materials_and_textures/MainActivity.kt new file mode 100644 index 00000000..d5d21c4b --- /dev/null +++ b/examples/flutter/materials_and_textures/android/app/src/main/kotlin/com/example/materials_and_textures/MainActivity.kt @@ -0,0 +1,5 @@ +package com.example.materials_and_textures + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity : FlutterActivity() diff --git a/examples/flutter/materials_and_textures/android/app/src/main/res/drawable-v21/launch_background.xml b/examples/flutter/materials_and_textures/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 00000000..f74085f3 --- /dev/null +++ b/examples/flutter/materials_and_textures/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/examples/flutter/materials_and_textures/android/app/src/main/res/drawable/launch_background.xml b/examples/flutter/materials_and_textures/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 00000000..304732f8 --- /dev/null +++ b/examples/flutter/materials_and_textures/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/examples/flutter/materials_and_textures/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/examples/flutter/materials_and_textures/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 00000000..db77bb4b Binary files /dev/null and b/examples/flutter/materials_and_textures/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/examples/flutter/materials_and_textures/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/examples/flutter/materials_and_textures/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 00000000..17987b79 Binary files /dev/null and b/examples/flutter/materials_and_textures/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/examples/flutter/materials_and_textures/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/examples/flutter/materials_and_textures/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 00000000..09d43914 Binary files /dev/null and b/examples/flutter/materials_and_textures/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/examples/flutter/materials_and_textures/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/examples/flutter/materials_and_textures/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 00000000..d5f1c8d3 Binary files /dev/null and b/examples/flutter/materials_and_textures/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/examples/flutter/materials_and_textures/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/examples/flutter/materials_and_textures/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 00000000..4d6372ee Binary files /dev/null and b/examples/flutter/materials_and_textures/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/examples/flutter/materials_and_textures/android/app/src/main/res/values-night/styles.xml b/examples/flutter/materials_and_textures/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 00000000..06952be7 --- /dev/null +++ b/examples/flutter/materials_and_textures/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/examples/flutter/materials_and_textures/android/app/src/main/res/values/styles.xml b/examples/flutter/materials_and_textures/android/app/src/main/res/values/styles.xml new file mode 100644 index 00000000..cb1ef880 --- /dev/null +++ b/examples/flutter/materials_and_textures/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/examples/flutter/materials_and_textures/android/app/src/profile/AndroidManifest.xml b/examples/flutter/materials_and_textures/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 00000000..399f6981 --- /dev/null +++ b/examples/flutter/materials_and_textures/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/examples/flutter/materials_and_textures/android/build.gradle.kts b/examples/flutter/materials_and_textures/android/build.gradle.kts new file mode 100644 index 00000000..dbee657b --- /dev/null +++ b/examples/flutter/materials_and_textures/android/build.gradle.kts @@ -0,0 +1,24 @@ +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("clean") { + delete(rootProject.layout.buildDirectory) +} diff --git a/examples/flutter/materials_and_textures/android/gradle.properties b/examples/flutter/materials_and_textures/android/gradle.properties new file mode 100644 index 00000000..f018a618 --- /dev/null +++ b/examples/flutter/materials_and_textures/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError +android.useAndroidX=true +android.enableJetifier=true diff --git a/examples/flutter/materials_and_textures/android/gradle/wrapper/gradle-wrapper.properties b/examples/flutter/materials_and_textures/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..ac3b4792 --- /dev/null +++ b/examples/flutter/materials_and_textures/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.12-all.zip diff --git a/examples/flutter/materials_and_textures/android/settings.gradle.kts b/examples/flutter/materials_and_textures/android/settings.gradle.kts new file mode 100644 index 00000000..fb605bc8 --- /dev/null +++ b/examples/flutter/materials_and_textures/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.9.1" apply false + id("org.jetbrains.kotlin.android") version "2.1.0" apply false +} + +include(":app")