Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[webview_flutter] Fix issue where local and asset HTML files cannot be loaded #3693

Closed
wants to merge 13 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions .ci/scripts/build_all_plugins.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
# 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.

cd all_plugins
flutter build windows --debug
flutter build windows --release
7 changes: 7 additions & 0 deletions .ci/scripts/build_examples_uwp.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
# 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.

dart ./script/tool/bin/flutter_plugin_tools.dart build-examples --winuwp \
--packages-for-branch
7 changes: 7 additions & 0 deletions .ci/scripts/build_examples_win32.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
# 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.

dart ./script/tool/bin/flutter_plugin_tools.dart build-examples --windows \
--packages-for-branch
7 changes: 7 additions & 0 deletions .ci/scripts/create_all_plugins_app.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
# 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.

dart ./script/tool/bin/flutter_plugin_tools.dart all-plugins-app \
--output-dir=. --exclude script/configs/exclude_all_plugins_app.yaml
7 changes: 7 additions & 0 deletions .ci/scripts/drive_examples_win32.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
# 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.

dart ./script/tool/bin/flutter_plugin_tools.dart drive-examples --windows \
--packages-for-branch
7 changes: 7 additions & 0 deletions .ci/scripts/native_test_win32.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
# 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.

dart ./script/tool/bin/flutter_plugin_tools.dart native-test --windows \
--no-integration --packages-for-branch
7 changes: 7 additions & 0 deletions .ci/scripts/plugin_tools_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
# 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.

cd script/tool
dart pub run test
10 changes: 5 additions & 5 deletions ...e_maps_flutter_web/example/regen_mocks.sh → .ci/scripts/prepare_tool.sh
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/bash
#!/bin/bash
# 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.

flutter pub get
# To set FETCH_HEAD for "git merge-base" to work
git fetch origin master

echo "(Re)generating mocks."

flutter pub run build_runner build --delete-conflicting-outputs
cd script/tool
dart pub get
7 changes: 7 additions & 0 deletions .ci/targets/build_all_plugins.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
tasks:
- name: prepare tool
script: .ci/scripts/prepare_tool.sh
- name: create all_plugins app
script: .ci/scripts/create_all_plugins_app.sh
- name: build all_plugins
script: .ci/scripts/build_all_plugins.sh
5 changes: 5 additions & 0 deletions .ci/targets/plugin_tools_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tasks:
- name: prepare tool
script: .ci/scripts/prepare_tool.sh
- name: tool unit tests
script: .ci/scripts/plugin_tools_tests.sh
5 changes: 5 additions & 0 deletions .ci/targets/uwp_build_and_platform_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tasks:
- name: prepare tool
script: .ci/scripts/prepare_tool.sh
- name: build examples (UWP)
script: .ci/scripts/build_examples_uwp.sh
9 changes: 9 additions & 0 deletions .ci/targets/windows_build_and_platform_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
tasks:
- name: prepare tool
script: .ci/scripts/prepare_tool.sh
- name: build examples (Win32)
script: .ci/scripts/build_examples_win32.sh
- name: native unit tests (Win32)
script: .ci/scripts/native_test_win32.sh
- name: drive examples (Win32)
script: .ci/scripts/drive_examples_win32.sh
54 changes: 54 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: release
on:
push:
branches:
- master

jobs:
release:
if: github.repository_owner == 'flutter'
name: release
permissions:
# Release needs to push a tag back to the repo.
contents: write
runs-on: ubuntu-latest
steps:
- name: "Install Flutter"
# Github Actions don't support templates so it is hard to share this snippet with another action
# If we eventually need to use this in more workflow, we could create a shell script that contains this
# snippet.
run: |
cd $HOME
git clone https://github.com/flutter/flutter.git --depth 1 -b stable _flutter
echo "$HOME/_flutter/bin" >> $GITHUB_PATH
cd $GITHUB_WORKSPACE
# Checks out a copy of the repo.
- name: Check out code
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
with:
fetch-depth: 0 # Fetch all history so the tool can get all the tags to determine version.
- name: Set up tools
run: dart pub get
working-directory: ${{ github.workspace }}/script/tool

# This workflow should be the last to run. So wait for all the other tests to succeed.
- name: Wait on all tests
uses: lewagon/wait-on-check-action@5e937358caba2c7876a2ee06e4a48d0664fe4967
with:
ref: ${{ github.sha }}
running-workflow-name: 'release'
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 180 # seconds
allowed-conclusions: success,neutral
# verbose:true will produce too many logs that hang github actions web UI.
verbose: false

- name: run release
run: |
git config --global user.name ${{ secrets.USER_NAME }}
git config --global user.email ${{ secrets.USER_EMAIL }}
dart ./script/tool/lib/src/main.dart publish-plugin --all-changed --base-sha=HEAD~ --skip-confirmation --remote=origin
env: {PUB_CREDENTIALS: "${{ secrets.PUB_CREDENTIALS }}"}

env:
DEFAULT_BRANCH: master
59 changes: 59 additions & 0 deletions packages/android_alarm_manager/android/lint-baseline.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
<issues format="5" by="lint 3.3.0" client="gradle" variant="debug" version="3.3.0">

<issue
id="LongLogTag"
message="The logging tag can be at most 23 characters, was 25 (AndroidAlarmManagerPlugin)"
errorLine1=" Log.i(TAG, &quot;onAttachedToEngine&quot;);"
errorLine2=" ~~~">
<location
file="src/main/java/io/flutter/plugins/androidalarmmanager/AndroidAlarmManagerPlugin.java"
line="75"
column="13"/>
</issue>

<issue
id="LongLogTag"
message="The logging tag can be at most 23 characters, was 25 (AndroidAlarmManagerPlugin)"
errorLine1=" Log.i(TAG, &quot;onDetachedFromEngine&quot;);"
errorLine2=" ~~~">
<location
file="src/main/java/io/flutter/plugins/androidalarmmanager/AndroidAlarmManagerPlugin.java"
line="96"
column="11"/>
</issue>

<issue
id="LongLogTag"
message="The logging tag can be at most 23 characters, was 25 (FlutterBackgroundExecutor)"
errorLine1=" Log.e(TAG, &quot;Background isolate already started&quot;);"
errorLine2=" ~~~">
<location
file="src/main/java/io/flutter/plugins/androidalarmmanager/FlutterBackgroundExecutor.java"
line="130"
column="13"/>
</issue>

<issue
id="LongLogTag"
message="The logging tag can be at most 23 characters, was 25 (FlutterBackgroundExecutor)"
errorLine1=" Log.i(TAG, &quot;Starting AlarmService...&quot;);"
errorLine2=" ~~~">
<location
file="src/main/java/io/flutter/plugins/androidalarmmanager/FlutterBackgroundExecutor.java"
line="134"
column="11"/>
</issue>

<issue
id="StaticFieldLeak"
message="Do not place Android context classes in static fields (static reference to `AndroidAlarmManagerPlugin` which has field `context` pointing to `Context`); this is a memory leak (and also breaks Instant Run)"
errorLine1=" private static AndroidAlarmManagerPlugin instance;"
errorLine2=" ~~~~~~">
<location
file="src/main/java/io/flutter/plugins/androidalarmmanager/AndroidAlarmManagerPlugin.java"
line="43"
column="11"/>
</issue>

</issues>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// 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.

package io.flutter.plugins;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface DartIntegrationTest {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// 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.

package io.flutter.plugins;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface DartIntegrationTest {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// 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.

package io.flutter.plugins;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface DartIntegrationTest {}
114 changes: 114 additions & 0 deletions packages/camera/camera/android/lint-baseline.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
<?xml version="1.0" encoding="UTF-8"?>
<issues format="5" by="lint 3.5.0" client="gradle" variant="debug" version="3.5.0">

<issue
id="Assert"
message="Assertions are unreliable in Dalvik and unimplemented in ART. Use `BuildConfig.DEBUG` conditional checks instead."
errorLine1=" assert (boundaries.getWidth() > 0 &amp;&amp; boundaries.getHeight() > 0);"
errorLine2=" ~~~~~~">
<location
file="src/main/java/io/flutter/plugins/camera/CameraRegionUtils.java"
line="73"
column="5"/>
</issue>

<issue
id="Assert"
message="Assertions are unreliable in Dalvik and unimplemented in ART. Use `BuildConfig.DEBUG` conditional checks instead."
errorLine1=" assert (x >= 0 &amp;&amp; x &lt;= 1);"
errorLine2=" ~~~~~~">
<location
file="src/main/java/io/flutter/plugins/camera/CameraRegionUtils.java"
line="74"
column="5"/>
</issue>

<issue
id="Assert"
message="Assertions are unreliable in Dalvik and unimplemented in ART. Use `BuildConfig.DEBUG` conditional checks instead."
errorLine1=" assert (y >= 0 &amp;&amp; y &lt;= 1);"
errorLine2=" ~~~~~~">
<location
file="src/main/java/io/flutter/plugins/camera/CameraRegionUtils.java"
line="75"
column="5"/>
</issue>

<issue
id="Assert"
message="Assertions are unreliable in Dalvik and unimplemented in ART. Use `BuildConfig.DEBUG` conditional checks instead."
errorLine1=" assert (maxBoundaries == null || maxBoundaries.getWidth() > 0);"
errorLine2=" ~~~~~~">
<location
file="src/main/java/io/flutter/plugins/camera/CameraRegions.java"
line="16"
column="5"/>
</issue>

<issue
id="Assert"
message="Assertions are unreliable in Dalvik and unimplemented in ART. Use `BuildConfig.DEBUG` conditional checks instead."
errorLine1=" assert (maxBoundaries == null || maxBoundaries.getHeight() > 0);"
errorLine2=" ~~~~~~">
<location
file="src/main/java/io/flutter/plugins/camera/CameraRegions.java"
line="17"
column="5"/>
</issue>

<issue
id="Assert"
message="Assertions are unreliable in Dalvik and unimplemented in ART. Use `BuildConfig.DEBUG` conditional checks instead."
errorLine1=" assert (x >= 0 &amp;&amp; x &lt;= 1);"
errorLine2=" ~~~~~~">
<location
file="src/main/java/io/flutter/plugins/camera/CameraRegions.java"
line="50"
column="5"/>
</issue>

<issue
id="Assert"
message="Assertions are unreliable in Dalvik and unimplemented in ART. Use `BuildConfig.DEBUG` conditional checks instead."
errorLine1=" assert (y >= 0 &amp;&amp; y &lt;= 1);"
errorLine2=" ~~~~~~">
<location
file="src/main/java/io/flutter/plugins/camera/CameraRegions.java"
line="51"
column="5"/>
</issue>

<issue
id="SwitchIntDef"
message="Switch statement on an `int` with known associated constant missing case `Configuration.ORIENTATION_SQUARE`, `Configuration.ORIENTATION_UNDEFINED`"
errorLine1=" switch (orientation) {"
errorLine2=" ~~~~~~">
<location
file="src/main/java/io/flutter/plugins/camera/DeviceOrientationManager.java"
line="143"
column="5"/>
</issue>

<issue
id="SwitchIntDef"
message="Switch statement on an `int` with known associated constant missing case `Configuration.ORIENTATION_SQUARE`, `Configuration.ORIENTATION_UNDEFINED`"
errorLine1=" switch (orientation) {"
errorLine2=" ~~~~~~">
<location
file="src/main/java/io/flutter/plugins/camera/features/sensororientation/DeviceOrientationManager.java"
line="264"
column="5"/>
</issue>

<issue
id="ObsoleteSdkInt"
message="Unnecessary; SDK_INT is never &lt; 21"
errorLine1=" if (Build.VERSION.SDK_INT &lt; Build.VERSION_CODES.LOLLIPOP) {"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/io/flutter/plugins/camera/CameraPlugin.java"
line="102"
column="9"/>
</issue>

</issues>
Loading