Skip to content

Commit fd99dae

Browse files
committed
Move DevTools case_study apps to the demos repository
1 parent b722f07 commit fd99dae

File tree

776 files changed

+1070728
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

776 files changed

+1070728
-0
lines changed

devexp_demos/README.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Demo applications used by the Dart & Flutter Developer Experience team.
2+
3+
These applications consist of Dart & Flutter apps that are used for local
4+
testing of tools like Flutter DevTools, Flutter & Dart supported IDEs, and the
5+
Dart Analysis Server. Some apps may have also been used for user experience
6+
testing.
7+
8+
There is no guarantee that these apps will be further maintained or kept up to
9+
date with the latest Dart and Flutter versions.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<!--
2+
Copyright 2025 The Flutter Authors
3+
Use of this source code is governed by a BSD-style license that can be
4+
found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.
5+
-->
6+
This directory holds optimized versions of the applications in
7+
`case_study/code_size/unoptimized/`.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.buildlog/
9+
.history
10+
.svn/
11+
12+
# IntelliJ related
13+
*.iml
14+
*.ipr
15+
*.iws
16+
.idea/
17+
18+
# The .vscode folder contains launch configuration and tasks you configure in
19+
# VS Code which you may wish to be included in version control, so this line
20+
# is commented out by default.
21+
#.vscode/
22+
23+
# Flutter/Dart/Pub related
24+
**/doc/api/
25+
**/ios/Flutter/.last_build_id
26+
.dart_tool/
27+
.flutter-plugins
28+
.flutter-plugins-dependencies
29+
.packages
30+
.pub-cache/
31+
.pub/
32+
/build/
33+
34+
# Web related
35+
lib/generated_plugin_registrant.dart
36+
37+
# Symbolication related
38+
app.*.symbols
39+
40+
# Obfuscation related
41+
app.*.map.json
42+
43+
# Exceptions to above rules.
44+
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This file tracks properties of this Flutter project.
2+
# Used by Flutter tool to assess capabilities and perform upgrades etc.
3+
#
4+
# This file should be version controlled and should not be manually edited.
5+
6+
version:
7+
revision: 561735ad89a14c63597f9acb77d447c7e0ed4fec
8+
channel: master
9+
10+
project_type: app
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<!--
2+
Copyright 2025 The Flutter Authors
3+
Use of this source code is governed by a BSD-style license that can be
4+
found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.
5+
-->
6+
# code_size_images
7+
8+
A Flutter project demonstrating code size issues with images
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
gradle-wrapper.jar
2+
/.gradle
3+
/captures/
4+
/gradlew
5+
/gradlew.bat
6+
/local.properties
7+
GeneratedPluginRegistrant.java
8+
9+
# Remember to never publicly share your keystore.
10+
# See https://flutter.dev/to/reference-keystore
11+
key.properties
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
// Copyright 2025 The Flutter Authors
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.
4+
def localProperties = new Properties()
5+
def localPropertiesFile = rootProject.file('local.properties')
6+
if (localPropertiesFile.exists()) {
7+
localPropertiesFile.withReader('UTF-8') { reader ->
8+
localProperties.load(reader)
9+
}
10+
}
11+
12+
def flutterRoot = localProperties.getProperty('flutter.sdk')
13+
if (flutterRoot == null) {
14+
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
15+
}
16+
17+
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
18+
if (flutterVersionCode == null) {
19+
flutterVersionCode = '1'
20+
}
21+
22+
def flutterVersionName = localProperties.getProperty('flutter.versionName')
23+
if (flutterVersionName == null) {
24+
flutterVersionName = '1.0'
25+
}
26+
27+
apply plugin: 'com.android.application'
28+
apply plugin: 'kotlin-android'
29+
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
30+
31+
android {
32+
compileSdkVersion 28
33+
34+
sourceSets {
35+
main.java.srcDirs += 'src/main/kotlin'
36+
}
37+
38+
lintOptions {
39+
disable 'InvalidPackage'
40+
}
41+
42+
defaultConfig {
43+
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
44+
applicationId "com.example.code_size_images"
45+
minSdkVersion 16
46+
targetSdkVersion 28
47+
versionCode flutterVersionCode.toInteger()
48+
versionName flutterVersionName
49+
}
50+
51+
buildTypes {
52+
release {
53+
// TODO: Add your own signing config for the release build.
54+
// Signing with the debug keys for now, so `flutter run --release` works.
55+
signingConfig signingConfigs.debug
56+
}
57+
}
58+
}
59+
60+
flutter {
61+
source '../..'
62+
}
63+
64+
dependencies {
65+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
66+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!--
2+
Copyright 2025 The Flutter Authors
3+
Use of this source code is governed by a BSD-style license that can be
4+
found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.
5+
-->
6+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
7+
package="com.example.code_size_images">
8+
<!-- Flutter needs it to communicate with the running application
9+
to allow setting breakpoints, to provide hot reload, etc.
10+
-->
11+
<uses-permission android:name="android.permission.INTERNET"/>
12+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<!--
2+
Copyright 2025 The Flutter Authors
3+
Use of this source code is governed by a BSD-style license that can be
4+
found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.
5+
-->
6+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
7+
package="com.example.code_size_images">
8+
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
9+
calls FlutterMain.startInitialization(this); in its onCreate method.
10+
In most cases you can leave this as-is, but you if you want to provide
11+
additional functionality it is fine to subclass or reimplement
12+
FlutterApplication and put your custom class here. -->
13+
<application
14+
android:name="io.flutter.app.FlutterApplication"
15+
android:label="code_size_images"
16+
android:icon="@mipmap/ic_launcher">
17+
<activity
18+
android:name=".MainActivity"
19+
android:launchMode="singleTop"
20+
android:theme="@style/LaunchTheme"
21+
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
22+
android:hardwareAccelerated="true"
23+
android:windowSoftInputMode="adjustResize">
24+
<!-- Specifies an Android theme to apply to this Activity as soon as
25+
the Android process has started. This theme is visible to the user
26+
while the Flutter UI initializes. After that, this theme continues
27+
to determine the Window background behind the Flutter UI. -->
28+
<meta-data
29+
android:name="io.flutter.embedding.android.NormalTheme"
30+
android:resource="@style/NormalTheme"
31+
/>
32+
<!-- Displays an Android View that continues showing the launch screen
33+
Drawable until Flutter paints its first frame, then this splash
34+
screen fades out. A splash screen is useful to avoid any visual
35+
gap between the end of Android's launch screen and the painting of
36+
Flutter's first frame. -->
37+
<meta-data
38+
android:name="io.flutter.embedding.android.SplashScreenDrawable"
39+
android:resource="@drawable/launch_background"
40+
/>
41+
<intent-filter>
42+
<action android:name="android.intent.action.MAIN"/>
43+
<category android:name="android.intent.category.LAUNCHER"/>
44+
</intent-filter>
45+
</activity>
46+
<!-- Don't delete the meta-data below.
47+
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
48+
<meta-data
49+
android:name="flutterEmbedding"
50+
android:value="2" />
51+
</application>
52+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package com.example.code_size_images
2+
3+
import io.flutter.embedding.android.FlutterActivity
4+
5+
class MainActivity: FlutterActivity() {
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!--
2+
Copyright 2025 The Flutter Authors
3+
Use of this source code is governed by a BSD-style license that can be
4+
found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.
5+
-->
6+
<?xml version="1.0" encoding="utf-8"?>
7+
<!-- Modify this file to customize your launch splash screen -->
8+
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
9+
<item android:drawable="@android:color/white" />
10+
11+
<!-- You can insert your own image assets here -->
12+
<!-- <item>
13+
<bitmap
14+
android:gravity="center"
15+
android:src="@mipmap/launch_image" />
16+
</item> -->
17+
</layer-list>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!--
2+
Copyright 2025 The Flutter Authors
3+
Use of this source code is governed by a BSD-style license that can be
4+
found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.
5+
-->
6+
<?xml version="1.0" encoding="utf-8"?>
7+
<resources>
8+
<!-- Theme applied to the Android Window while the process is starting -->
9+
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
10+
<!-- Show a splash screen on the activity. Automatically removed when
11+
Flutter draws its first frame -->
12+
<item name="android:windowBackground">@drawable/launch_background</item>
13+
</style>
14+
<!-- Theme applied to the Android Window as soon as the process has started.
15+
This theme determines the color of the Android Window while your
16+
Flutter UI initializes, as well as behind your Flutter UI while its
17+
running.
18+
19+
This Theme is only used starting with V2 of Flutter's Android embedding. -->
20+
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
21+
<item name="android:windowBackground">@android:color/white</item>
22+
</style>
23+
</resources>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!--
2+
Copyright 2025 The Flutter Authors
3+
Use of this source code is governed by a BSD-style license that can be
4+
found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.
5+
-->
6+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
7+
package="com.example.code_size_images">
8+
<!-- Flutter needs it to communicate with the running application
9+
to allow setting breakpoints, to provide hot reload, etc.
10+
-->
11+
<uses-permission android:name="android.permission.INTERNET"/>
12+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// Copyright 2025 The Flutter Authors
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.
4+
buildscript {
5+
ext.kotlin_version = '1.3.50'
6+
repositories {
7+
google()
8+
jcenter()
9+
}
10+
11+
dependencies {
12+
classpath 'com.android.tools.build:gradle:3.5.0'
13+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
14+
}
15+
}
16+
17+
allprojects {
18+
repositories {
19+
google()
20+
jcenter()
21+
}
22+
}
23+
24+
rootProject.buildDir = '../build'
25+
subprojects {
26+
project.buildDir = "${rootProject.buildDir}/${project.name}"
27+
}
28+
subprojects {
29+
project.evaluationDependsOn(':app')
30+
}
31+
32+
task clean(type: Delete) {
33+
delete rootProject.buildDir
34+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
org.gradle.jvmargs=-Xmx1536M
2+
android.enableR8=true
3+
android.useAndroidX=true
4+
android.enableJetifier=true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Fri Jun 23 08:50:38 CEST 2017
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Copyright 2025 The Flutter Authors
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.
4+
include ':app'
5+
6+
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
7+
def properties = new Properties()
8+
9+
assert localPropertiesFile.exists()
10+
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
11+
12+
def flutterSdkPath = properties.getProperty("flutter.sdk")
13+
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
14+
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
*.mode1v3
2+
*.mode2v3
3+
*.moved-aside
4+
*.pbxuser
5+
*.perspectivev3
6+
**/*sync/
7+
.sconsign.dblite
8+
.tags*
9+
**/.vagrant/
10+
**/DerivedData/
11+
Icon?
12+
**/Pods/
13+
**/.symlinks/
14+
profile
15+
xcuserdata
16+
**/.generated/
17+
Flutter/App.framework
18+
Flutter/Flutter.framework
19+
Flutter/Flutter.podspec
20+
Flutter/Generated.xcconfig
21+
Flutter/app.flx
22+
Flutter/app.zip
23+
Flutter/flutter_assets/
24+
Flutter/flutter_export_environment.sh
25+
ServiceDefinitions.json
26+
Runner/GeneratedPluginRegistrant.*
27+
28+
# Exceptions to above rules.
29+
!default.mode1v3
30+
!default.mode2v3
31+
!default.pbxuser
32+
!default.perspectivev3

0 commit comments

Comments
 (0)