-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[various] Modernize non-plugin Android example apps #11168
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
Open
stuartmorgan-g
wants to merge
15
commits into
flutter:main
Choose a base branch
from
stuartmorgan-g:android-example-refresh-part-ii-non-plugins
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
0d3e2cc
flutter_svg: recreate
stuartmorgan-g 0db1b85
flutter_svg: restore repo conventions
stuartmorgan-g 474aac3
google_fonts: recreate
stuartmorgan-g 7d937b8
google_fonts: restore repo conventions
stuartmorgan-g 411eebd
two_dimensional_scrollables: recreate
stuartmorgan-g 0b67796
two_dimensional_scrollables: restore repo conventions
stuartmorgan-g 9893fa2
go_router: recreate
stuartmorgan-g ea8b03b
go_router: restore repo conventions
stuartmorgan-g a8dede0
Fix orgs
stuartmorgan-g 97c62c5
extension_google_sign_in: recreate
stuartmorgan-g 0491e31
extension_google_sign_in: restore repo conventions
stuartmorgan-g 6dddc16
rfw: recreate all
stuartmorgan-g f03ec9f
rfw: restore repo conventions
stuartmorgan-g feb85fc
Restore file
stuartmorgan-g 3528c18
Fix copy/paste mistake in artifact hub usage
stuartmorgan-g File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
packages/extension_google_sign_in_as_googleapis_auth/example/.metadata
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # 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: "582a0e7c5581dc0ca5f7bfd8662bb8db6f59d536" | ||
| channel: "stable" | ||
|
|
||
| project_type: app | ||
|
|
||
| # Tracks metadata for the flutter migrate command | ||
| migration: | ||
| platforms: | ||
| - platform: root | ||
| create_revision: 582a0e7c5581dc0ca5f7bfd8662bb8db6f59d536 | ||
| base_revision: 582a0e7c5581dc0ca5f7bfd8662bb8db6f59d536 | ||
| - platform: android | ||
| create_revision: 582a0e7c5581dc0ca5f7bfd8662bb8db6f59d536 | ||
| base_revision: 582a0e7c5581dc0ca5f7bfd8662bb8db6f59d536 | ||
|
|
||
| # 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' | ||
| - 'ios/Runner.xcodeproj/project.pbxproj' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 0 additions & 55 deletions
55
packages/extension_google_sign_in_as_googleapis_auth/example/android/app/build.gradle
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...nsion_google_sign_in_as_googleapis_auth/example/android/app/src/debug/AndroidManifest.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 0 additions & 9 deletions
9
...xample/android/app/src/main/java/io/flutter/plugins/googlesigninexample/MainActivity.java
This file was deleted.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
.../android/app/src/main/kotlin/dev/flutter/extension_google_sign_in_example/MainActivity.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| // Copyright 2013 The Flutter Authors | ||
| // Use of this source code is governed by a BSD-style license that can be | ||
| // found in the LICENSE file. | ||
|
|
||
| package dev.flutter.extension_google_sign_in_example | ||
|
|
||
| import io.flutter.embedding.android.FlutterActivity | ||
|
|
||
| class MainActivity : FlutterActivity() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...ion_google_sign_in_as_googleapis_auth/example/android/app/src/profile/AndroidManifest.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 0 additions & 22 deletions
22
packages/extension_google_sign_in_as_googleapis_auth/example/android/build.gradle
This file was deleted.
Oops, something went wrong.
33 changes: 33 additions & 0 deletions
33
packages/extension_google_sign_in_as_googleapis_auth/example/android/build.gradle.kts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| allprojects { | ||
| repositories { | ||
| // See https://github.com/flutter/flutter/blob/master/docs/ecosystem/Plugins-and-Packages-repository-structure.md#gradle-structure for more info. | ||
| val artifactRepoKey = "ARTIFACT_HUB_REPOSITORY" | ||
| val artifactRepoUrl = System.getenv(artifactRepoKey) | ||
| if (artifactRepoUrl != null) { | ||
| println("Using artifact hub") | ||
| maven { | ||
| url = uri(artifactRepoUrl) | ||
| } | ||
| } | ||
| 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) | ||
| } | ||
2 changes: 1 addition & 1 deletion
2
packages/extension_google_sign_in_as_googleapis_auth/example/android/gradle.properties
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| org.gradle.jvmargs=-Xmx4G | ||
| org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError | ||
| android.useAndroidX=true |
4 changes: 1 addition & 3 deletions
4
...oogle_sign_in_as_googleapis_auth/example/android/gradle/wrapper/gradle-wrapper.properties
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,5 @@ | ||
| #Fri Jun 23 08:50:38 CEST 2017 | ||
| distributionBase=GRADLE_USER_HOME | ||
| distributionPath=wrapper/dists | ||
| zipStoreBase=GRADLE_USER_HOME | ||
| zipStorePath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip | ||
|
|
||
| distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-all.zip |
28 changes: 0 additions & 28 deletions
28
packages/extension_google_sign_in_as_googleapis_auth/example/android/settings.gradle
This file was deleted.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
packages/extension_google_sign_in_as_googleapis_auth/example/android/settings.gradle.kts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| 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() | ||
| } | ||
| } | ||
|
|
||
| // See https://github.com/flutter/flutter/blob/master/docs/ecosystem/Plugins-and-Packages-repository-structure.md#gradle-structure for more info. | ||
| 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 | ||
| id("com.google.cloud.artifactregistry.gradle-plugin") version "2.2.1" | ||
| } | ||
|
|
||
| include(":app") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
subprojectsconfiguration is split into two separate blocks. For better readability and consistency, these can be combined into a single block. This applies to all other new top-levelbuild.gradle.ktsfiles in this PR (go_router,google_fonts,rfw/*,two_dimensional_scrollables, andflutter_svgexamples).subprojects { val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name) project.layout.buildDirectory.value(newSubprojectBuildDir) project.evaluationDependsOn(":app") }There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gmackall Something to consider for the template?