-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[animations] Remove .flutter-plugins reference from example app
#8002
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 6 commits
ac456d2
2da3529
3a52373
de13176
eb88da3
0a59b04
edde394
7b75557
78b5fd0
5677d9e
557c32e
f76db65
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,33 +1,14 @@ | ||
| def localProperties = new Properties() | ||
| def localPropertiesFile = rootProject.file('local.properties') | ||
| if (localPropertiesFile.exists()) { | ||
| localPropertiesFile.withReader('UTF-8') { reader -> | ||
| localProperties.load(reader) | ||
| } | ||
| } | ||
|
|
||
| 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' | ||
| } | ||
|
|
||
| def flutterVersionName = localProperties.getProperty('flutter.versionName') | ||
| if (flutterVersionName == null) { | ||
| flutterVersionName = '1.0' | ||
| 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" | ||
| } | ||
|
|
||
| apply plugin: 'com.android.application' | ||
| apply plugin: 'kotlin-android' | ||
| apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" | ||
|
|
||
| android { | ||
| namespace 'dev.flutter.packages.animations.example' | ||
| compileSdk flutter.compileSdkVersion | ||
| namespace = "dev.flutter.packages.animations.example" | ||
| compileSdk = flutter.compileSdkVersion | ||
| ndkVersion = flutter.ndkVersion | ||
|
|
||
| compileOptions { | ||
| sourceCompatibility JavaVersion.VERSION_11 | ||
|
|
@@ -42,36 +23,26 @@ android { | |
| main.java.srcDirs += 'src/main/kotlin' | ||
| } | ||
|
|
||
|
|
||
| defaultConfig { | ||
| applicationId "dev.flutter.packages.animations.example" | ||
| minSdkVersion flutter.minSdkVersion | ||
| targetSdkVersion 32 | ||
| versionCode flutterVersionCode.toInteger() | ||
| versionName flutterVersionName | ||
| testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
| // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). | ||
| applicationId = "dev.flutter.packages.animations.example" | ||
| // You can update the following values to match your application needs. | ||
| // For more information, see: https://flutter.dev/to/review-gradle-config. | ||
camsim99 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| minSdk = flutter.minSdkVersion | ||
| 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.debug | ||
| signingConfig = signingConfigs.debug | ||
| } | ||
| } | ||
| namespace 'dev.flutter.packages.animations.example' | ||
| lint { | ||
| disable 'InvalidPackage' | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interesting, we don't need this any more? It was added relatively recently (#3574)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh I didn't catch this when I was adding back removed lines. I'll add it back.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't see any failed Android lint tests though 🤷🏻 Maybe @reidbaker remembers why we needed this.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I dont remember reading the definition also didnt jog my memory.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's try removing it then :) |
||
| } | ||
| } | ||
|
|
||
| flutter { | ||
| source '../..' | ||
| } | ||
|
|
||
| dependencies { | ||
| implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" | ||
| testImplementation 'junit:junit:4.12' | ||
| androidTestImplementation 'androidx.test:runner:1.1.1' | ||
| androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' | ||
| source = "../.." | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,5 @@ | ||
| // Copyright 2013 The Flutter Authors. All rights reserved. | ||
| // Use of this source code is governed by a BSD-style license that can be | ||
| // found in the LICENSE file. | ||
camsim99 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| package dev.flutter.packages.animations.example | ||
|
|
||
| import io.flutter.embedding.android.FlutterActivity | ||
|
|
||
| class MainActivity : FlutterActivity() {} | ||
| class MainActivity: FlutterActivity() | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <!-- Modify this file to customize your launch splash screen --> | ||
| <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | ||
| <item android:drawable="?android:colorBackground" /> | ||
|
|
||
| <!-- You can insert your own image assets here --> | ||
| <!-- <item> | ||
| <bitmap | ||
| android:gravity="center" | ||
| android:src="@mipmap/launch_image" /> | ||
| </item> --> | ||
| </layer-list> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <resources> | ||
| <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on --> | ||
| <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar"> | ||
| <!-- Show a splash screen on the activity. Automatically removed when | ||
| the Flutter engine draws its first frame --> | ||
| <item name="android:windowBackground">@drawable/launch_background</item> | ||
| </style> | ||
| <!-- Theme applied to the Android Window as soon as the process has started. | ||
| This theme determines the color of the Android Window while your | ||
| Flutter UI initializes, as well as behind your Flutter UI while its | ||
| running. | ||
| This Theme is only used starting with V2 of Flutter's Android embedding. --> | ||
| <style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar"> | ||
| <item name="android:windowBackground">?android:colorBackground</item> | ||
| </style> | ||
| </resources> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,18 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <resources> | ||
| <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar"> | ||
| <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off --> | ||
| <style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar"> | ||
| <!-- Show a splash screen on the activity. Automatically removed when | ||
| Flutter draws its first frame --> | ||
| the Flutter engine draws its first frame --> | ||
| <item name="android:windowBackground">@drawable/launch_background</item> | ||
| </style> | ||
| <!-- Theme applied to the Android Window as soon as the process has started. | ||
| This theme determines the color of the Android Window while your | ||
| Flutter UI initializes, as well as behind your Flutter UI while its | ||
| running. | ||
|
|
||
| This Theme is only used starting with V2 of Flutter's Android embedding. --> | ||
| <style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar"> | ||
| <item name="android:windowBackground">?android:colorBackground</item> | ||
| </style> | ||
| </resources> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,35 +1,16 @@ | ||
| buildscript { | ||
| ext.kotlin_version = '1.9.0' | ||
| repositories { | ||
| google() | ||
| mavenCentral() | ||
| } | ||
|
|
||
| dependencies { | ||
| classpath 'com.android.tools.build:gradle:8.5.1' | ||
| classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" | ||
| } | ||
| } | ||
|
|
||
| allprojects { | ||
| repositories { | ||
| // See https://github.com/flutter/flutter/blob/master/docs/ecosystem/Plugins-and-Packages-repository-structure.md#gradle-structure for more info. | ||
| def artifactRepoKey = 'ARTIFACT_HUB_REPOSITORY' | ||
| if (System.getenv().containsKey(artifactRepoKey)) { | ||
| println "Using artifact hub" | ||
| maven { url System.getenv(artifactRepoKey) } | ||
| } | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You'll need to add the new artifact hub code; see https://github.com/flutter/packages/pull/7822/files for an example. |
||
| google() | ||
| mavenCentral() | ||
| } | ||
| } | ||
|
|
||
| rootProject.buildDir = '../build' | ||
| rootProject.buildDir = "../build" | ||
| subprojects { | ||
| project.buildDir = "${rootProject.buildDir}/${project.name}" | ||
| } | ||
| subprojects { | ||
| project.evaluationDependsOn(':app') | ||
| project.evaluationDependsOn(":app") | ||
| } | ||
|
|
||
| tasks.register("clean", Delete) { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| org.gradle.jvmargs=-Xmx1536M | ||
| org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError | ||
| android.useAndroidX=true | ||
| android.enableJetifier=true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,28 +1,25 @@ | ||
| include ':app' | ||
| pluginManagement { | ||
| def flutterSdkPath = { | ||
| def properties = new Properties() | ||
| file("local.properties").withInputStream { properties.load(it) } | ||
| def flutterSdkPath = properties.getProperty("flutter.sdk") | ||
| assert flutterSdkPath != null, "flutter.sdk not set in local.properties" | ||
| return flutterSdkPath | ||
| }() | ||
|
|
||
| def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() | ||
| includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") | ||
|
|
||
| def plugins = new Properties() | ||
| def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') | ||
| if (pluginsFile.exists()) { | ||
| pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } | ||
| repositories { | ||
| google() | ||
| mavenCentral() | ||
| gradlePluginPortal() | ||
| } | ||
| } | ||
|
|
||
| plugins.each { name, path -> | ||
| def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() | ||
| include ":$name" | ||
| project(":$name").projectDir = pluginDirectory | ||
| plugins { | ||
| id "dev.flutter.flutter-plugin-loader" version "1.0.0" | ||
| id "com.android.application" version "8.1.0" apply false | ||
|
||
| id "org.jetbrains.kotlin.android" version "1.8.22" apply false | ||
camsim99 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| // See https://github.com/flutter/flutter/blob/master/docs/ecosystem/Plugins-and-Packages-repository-structure.md#gradle-structure for more info. | ||
| buildscript { | ||
| repositories { | ||
| maven { | ||
| url "https://plugins.gradle.org/m2/" | ||
| } | ||
| } | ||
| dependencies { | ||
| classpath "gradle.plugin.com.google.cloud.artifactregistry:artifactregistry-gradle-plugin:2.2.1" | ||
| } | ||
| } | ||
| apply plugin: "com.google.cloud.artifactregistry.gradle-plugin" | ||
| include ":app" | ||
Uh oh!
There was an error while loading. Please reload this page.