This file contains 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
import 'dart:io'; | |
import 'dart:convert'; | |
const String kFlutterPath = '/usr/local/google/home/liyuqian/flutter/flutter'; | |
const String kLogPath = '/var/tmp/end_driver'; | |
const String kFlutter308 = '024eaa3fb45dc41d0e3accb422b76da2d2d16731'; | |
const String kFlutter312 = 'e1005143ddadde4eff337d32fec5977cd162127a'; | |
const String kFlutter315 = '439fbbe69e9eed51d8fe02774989111e420eba7e'; | |
const String kRegression = 'a29906d5f552f2984daf9bef569b7fe1295e1c70'; |
This file contains 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
# Install homebrew | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew doctor | |
# Install convenient tools | |
brew cask install iterm2 | |
brew cask install visual-studio-code | |
brew cask install google-chrome | |
# Install Dart |
This file contains 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
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Flutter Demo', | |
home: Scaffold( |
This file contains 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
// Run this by `history > history.out && dart analyze_date.dart`. | |
// Or you can download and run this script by: | |
// ``` | |
// curl https://gist.githubusercontent.com/liyuqian/403400fddd0e2a8687dbd6e092f21d51/raw/analyze_date.dart > analyze_dart.dart && history > history.out && dart analyze_dart.dart | |
// ``` | |
import 'dart:io'; | |
void printAnalysis(String action, Set<String> dates) { | |
final firstDate = DateTime.parse(dates.first); | |
final lastDate = DateTime.parse(dates.last); |
This file contains 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
cd c:\ | |
powershell | |
curl https://aka.ms/vs/15/release/vs_community.exe -o vs_community.exe | |
./vs_community.exe --passive --wait --add Microsoft.VisualStudio.Workload.NativeCrossPlat --add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended | |
curl https://download.microsoft.com/download/5/C/3/5C3770A3-12B4-4DB4-BAE7-99C624EB32AD/windowssdk/winsdksetup.exe -o winsdksetup.exe | |
./winsdksetup.exe /features OptionId.WindowsDesktopDebuggers /q | |
curl https://storage.googleapis.com/chrome-infra/depot_tools.zip -o depot_tools.zip | |
Expand-Archive -LiteralPath c:/depot_tools.zip -DestinationPath depot_tools | |
curl https://npm.taobao.org/mirrors/git-for-windows/v2.21.0.windows.1/MinGit-2.21.0-64-bit.zip -o MinGit.zip | |
Expand-Archive -LiteralPath MinGit.zip -DestinationPath MinGit |
This file contains 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
:: Tested on a "Windows Server version 1803 Datacenter Core for Containers" | |
:: GCE VM. | |
:: | |
:: It's known that other versions such as 1809 and Windows Server 2019 won't | |
:: work with the Dockerfile. | |
:: | |
:: Do not run this bat directly from c:\Users\<username> (default directory | |
:: after RDP into the VM) as Docker may not have permission. Run it inside | |
:: a directory like c:\Users\<username>\windows_build. |
This file contains 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 is tested on a "Windows Server version 1803 Datacenter Core for Containers" VM on GCE. | |
# It's known that other versions such as 1809 and Windows Server 2019 won't work with this. | |
# | |
# Note that "\" is the escape character. Use "\\"" for windows path separator. In many cases, | |
# "/"" can also be used as the separator in windows. | |
FROM microsoft/windowsservercore:1803 | |
# Restore the default Windows shell for correct batch processing. | |
SHELL ["cmd", "/S", "/C"] |
This file contains 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
# escape=` | |
FROM mcr.microsoft.com/dotnet/framework/sdk:4.7.2 | |
# Restore the default Windows shell for correct batch processing. | |
SHELL ["cmd", "/S", "/C"] | |
RUN NuGet install GitForWindows -Version 2.21.0 | |
RUN setx path "%path%";C:\GitForWindows.2.21.0\tools\cmd |
This file contains 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
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Flutter Demo', | |
home: Scaffold( |
This file contains 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
import 'dart:ui' as ui; | |
import 'dart:typed_data'; | |
import 'package:http/http.dart' as http; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/rendering.dart'; | |
void main() => runApp(MyApp()); |