Relicense Shrine demo to match rest of repository (#45718)
* Relicense Shrine demo to match rest of repository
The Shrine demo was Apache-licensed. The code was mostly
Google-written, with contributions from:
- Michelle Dudley (@michdud)
- Abhijeeth Padarthi <rkinabhi@gmail.com> (@rkinabhi)
- @a14n
I contacted all three, and they confirmed their approval for this
change, as described below.
Abhijeeth Padarthi said by e-mail on Thu, Nov 21, 2019 at 5:48 PM:
> hi Ian,
>
> sure :)
>
> let me know if I need to do anything on my end..
Michelle Dudley wrote by e-mail on Sun, Nov 24, 2019 at 2:07 PM:
> Hi Ian,
>
> That would be ok with me.
>
> Thanks,
>
> Michelle
@a14n said on Discord's Flutter server in the #hackers channel at 10:44PM on Thursday, November 21, 2019:
> @Hixie no problem I agree with this relicensing
* Remove shrine loophole from license checker.
diff --git a/dev/bots/analyze.dart b/dev/bots/analyze.dart
index 093d399..f711dea 100644
--- a/dev/bots/analyze.dart
+++ b/dev/bots/analyze.dart
@@ -240,7 +240,7 @@
}
Future<void> verifyNoMissingLicense(String workingDirectory) async {
- await _verifyNoMissingLicenseForExtension(workingDirectory, 'dart', _generateLicense('// '), skipShrine: true);
+ await _verifyNoMissingLicenseForExtension(workingDirectory, 'dart', _generateLicense('// '));
await _verifyNoMissingLicenseForExtension(workingDirectory, 'java', _generateLicense('// '));
await _verifyNoMissingLicenseForExtension(workingDirectory, 'h', _generateLicense('// '));
await _verifyNoMissingLicenseForExtension(workingDirectory, 'm', _generateLicense('// '));
@@ -254,14 +254,11 @@
await _verifyNoMissingLicenseForExtension(workingDirectory, 'xml', '<!-- ${_generateLicense('')} -->');
}
-Future<void> _verifyNoMissingLicenseForExtension(String workingDirectory, String extension, String license, { bool trailingBlank = true, bool skipShrine = true }) async {
+Future<void> _verifyNoMissingLicenseForExtension(String workingDirectory, String extension, String license, { bool trailingBlank = true }) async {
assert(!license.endsWith('\n'));
final String licensePattern = license + '\n' + (trailingBlank ? '\n' : '');
final List<String> errors = <String>[];
- for (FileSystemEntity entity in _allFiles(workingDirectory, extension)) {
- final File file = entity;
- if (skipShrine && path.split(file.path).contains('shrine'))
- continue; // TODO(ianh): I'm investigating relicensing this directory.
+ for (File file in _allFiles(workingDirectory, extension)) {
final String contents = file.readAsStringSync().replaceAll('\r\n', '\n');
if (contents.isEmpty)
continue; // let's not go down the /bin/true rabbit hole
diff --git a/examples/flutter_gallery/lib/demo/shrine/app.dart b/examples/flutter_gallery/lib/demo/shrine/app.dart
index cccf588..bb6768c 100644
--- a/examples/flutter_gallery/lib/demo/shrine/app.dart
+++ b/examples/flutter_gallery/lib/demo/shrine/app.dart
@@ -1,16 +1,6 @@
-// Copyright 2018-present the Flutter authors. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+// Copyright 2014 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.
import 'package:flutter/material.dart';
diff --git a/examples/flutter_gallery/lib/demo/shrine/backdrop.dart b/examples/flutter_gallery/lib/demo/shrine/backdrop.dart
index 6336b87..a5ef9b0 100644
--- a/examples/flutter_gallery/lib/demo/shrine/backdrop.dart
+++ b/examples/flutter_gallery/lib/demo/shrine/backdrop.dart
@@ -1,16 +1,6 @@
-// Copyright 2018-present the Flutter authors. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+// Copyright 2014 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.
import 'package:flutter/material.dart';
import 'package:meta/meta.dart';
diff --git a/examples/flutter_gallery/lib/demo/shrine/category_menu_page.dart b/examples/flutter_gallery/lib/demo/shrine/category_menu_page.dart
index 1ac62d5..02b80d7 100644
--- a/examples/flutter_gallery/lib/demo/shrine/category_menu_page.dart
+++ b/examples/flutter_gallery/lib/demo/shrine/category_menu_page.dart
@@ -1,16 +1,6 @@
-// Copyright 2018-present the Flutter authors. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+// Copyright 2014 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.
import 'package:flutter/material.dart';
import 'package:scoped_model/scoped_model.dart';
diff --git a/examples/flutter_gallery/lib/demo/shrine/colors.dart b/examples/flutter_gallery/lib/demo/shrine/colors.dart
index 66a4728..9a9cdf1 100644
--- a/examples/flutter_gallery/lib/demo/shrine/colors.dart
+++ b/examples/flutter_gallery/lib/demo/shrine/colors.dart
@@ -1,16 +1,6 @@
-// Copyright 2018-present the Flutter authors. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+// Copyright 2014 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.
import 'package:flutter/material.dart';
diff --git a/examples/flutter_gallery/lib/demo/shrine/expanding_bottom_sheet.dart b/examples/flutter_gallery/lib/demo/shrine/expanding_bottom_sheet.dart
index df8f947..c505cfa 100644
--- a/examples/flutter_gallery/lib/demo/shrine/expanding_bottom_sheet.dart
+++ b/examples/flutter_gallery/lib/demo/shrine/expanding_bottom_sheet.dart
@@ -1,16 +1,6 @@
-// Copyright 2018-present the Flutter authors. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+// Copyright 2014 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.
import 'dart:async';
diff --git a/examples/flutter_gallery/lib/demo/shrine/home.dart b/examples/flutter_gallery/lib/demo/shrine/home.dart
index c180c48..da3393d 100644
--- a/examples/flutter_gallery/lib/demo/shrine/home.dart
+++ b/examples/flutter_gallery/lib/demo/shrine/home.dart
@@ -1,16 +1,6 @@
-// Copyright 2018-present the Flutter authors. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+// Copyright 2014 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.
import 'package:flutter/material.dart';
import 'package:scoped_model/scoped_model.dart';
diff --git a/examples/flutter_gallery/lib/demo/shrine/login.dart b/examples/flutter_gallery/lib/demo/shrine/login.dart
index 23da066..aafffb6 100644
--- a/examples/flutter_gallery/lib/demo/shrine/login.dart
+++ b/examples/flutter_gallery/lib/demo/shrine/login.dart
@@ -1,16 +1,6 @@
-// Copyright 2018-present the Flutter authors. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+// Copyright 2014 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.
import 'package:flutter/material.dart';
diff --git a/examples/flutter_gallery/lib/demo/shrine/model/app_state_model.dart b/examples/flutter_gallery/lib/demo/shrine/model/app_state_model.dart
index 55d4806..46a5ac9 100644
--- a/examples/flutter_gallery/lib/demo/shrine/model/app_state_model.dart
+++ b/examples/flutter_gallery/lib/demo/shrine/model/app_state_model.dart
@@ -1,16 +1,6 @@
-// Copyright 2018-present the Flutter authors. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+// Copyright 2014 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.
import 'package:scoped_model/scoped_model.dart';
diff --git a/examples/flutter_gallery/lib/demo/shrine/model/product.dart b/examples/flutter_gallery/lib/demo/shrine/model/product.dart
index c19d4d5..d37b71a 100644
--- a/examples/flutter_gallery/lib/demo/shrine/model/product.dart
+++ b/examples/flutter_gallery/lib/demo/shrine/model/product.dart
@@ -1,16 +1,6 @@
-// Copyright 2018-present the Flutter authors. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+// Copyright 2014 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.
import 'package:flutter/foundation.dart';
diff --git a/examples/flutter_gallery/lib/demo/shrine/model/products_repository.dart b/examples/flutter_gallery/lib/demo/shrine/model/products_repository.dart
index 75bf4b3..92809a8 100644
--- a/examples/flutter_gallery/lib/demo/shrine/model/products_repository.dart
+++ b/examples/flutter_gallery/lib/demo/shrine/model/products_repository.dart
@@ -1,16 +1,6 @@
-// Copyright 2018-present the Flutter authors. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+// Copyright 2014 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.
import 'package:flutter_gallery/demo/shrine/model/product.dart';
diff --git a/examples/flutter_gallery/lib/demo/shrine/shopping_cart.dart b/examples/flutter_gallery/lib/demo/shrine/shopping_cart.dart
index 076e657..c5db16a 100644
--- a/examples/flutter_gallery/lib/demo/shrine/shopping_cart.dart
+++ b/examples/flutter_gallery/lib/demo/shrine/shopping_cart.dart
@@ -1,16 +1,6 @@
-// Copyright 2018-present the Flutter authors. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+// Copyright 2014 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.
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
diff --git a/examples/flutter_gallery/lib/demo/shrine/supplemental/asymmetric_view.dart b/examples/flutter_gallery/lib/demo/shrine/supplemental/asymmetric_view.dart
index 10922a1..c34af1e 100644
--- a/examples/flutter_gallery/lib/demo/shrine/supplemental/asymmetric_view.dart
+++ b/examples/flutter_gallery/lib/demo/shrine/supplemental/asymmetric_view.dart
@@ -1,16 +1,6 @@
-// Copyright 2018-present the Flutter authors. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+// Copyright 2014 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.
import 'package:flutter/material.dart';
diff --git a/examples/flutter_gallery/lib/demo/shrine/supplemental/cut_corners_border.dart b/examples/flutter_gallery/lib/demo/shrine/supplemental/cut_corners_border.dart
index 96e7e0e..b67d0e7 100644
--- a/examples/flutter_gallery/lib/demo/shrine/supplemental/cut_corners_border.dart
+++ b/examples/flutter_gallery/lib/demo/shrine/supplemental/cut_corners_border.dart
@@ -1,16 +1,6 @@
-// Copyright 2018-present the Flutter authors. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+// Copyright 2014 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.
import 'dart:ui' show lerpDouble;
diff --git a/examples/flutter_gallery/lib/demo/shrine/supplemental/product_card.dart b/examples/flutter_gallery/lib/demo/shrine/supplemental/product_card.dart
index d2a71a3..27b7be5 100644
--- a/examples/flutter_gallery/lib/demo/shrine/supplemental/product_card.dart
+++ b/examples/flutter_gallery/lib/demo/shrine/supplemental/product_card.dart
@@ -1,16 +1,6 @@
-// Copyright 2018-present the Flutter authors. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+// Copyright 2014 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.
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
diff --git a/examples/flutter_gallery/lib/demo/shrine/supplemental/product_columns.dart b/examples/flutter_gallery/lib/demo/shrine/supplemental/product_columns.dart
index 589f9c7..c989da1 100644
--- a/examples/flutter_gallery/lib/demo/shrine/supplemental/product_columns.dart
+++ b/examples/flutter_gallery/lib/demo/shrine/supplemental/product_columns.dart
@@ -1,16 +1,6 @@
-// Copyright 2018-present the Flutter authors. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+// Copyright 2014 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.
import 'package:flutter/material.dart';