Skip to content
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

Updated format validator for GitHub workflows #1245

Merged
merged 10 commits into from
Jan 27, 2025
3 changes: 1 addition & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,5 @@ jobs:
GOOGLEMOBILEADS_PLUGIN_SCOPE_EXAMPLE: ${{ matrix.REGEX }}
- name: "Flutter Format"
run: |
flutter pub global activate flutter_plugin_tools
flutter pub global run flutter_plugin_tools format
dart format samples/
./.github/workflows/scripts/validate-formatting.sh
9 changes: 0 additions & 9 deletions .github/workflows/gma_mediation_applovin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,3 @@ jobs:
run: |
cd packages/mediation/gma_mediation_applovin/
flutter analyze
- name: "Flutter Publish"
run: |
cd packages/mediation/gma_mediation_applovin/
flutter pub publish --dry-run
- name: "Flutter Format"
run: |
flutter pub global activate flutter_plugin_tools
flutter pub global run flutter_plugin_tools format
./.github/workflows/scripts/validate-formatting.sh
44 changes: 44 additions & 0 deletions .github/workflows/gma_mediation_chartboost.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Copyright 2024 Google LLC
#
# 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
#
# https://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.

name: gma_mediation_chartboost

on:
pull_request:
paths:
- "packages/mediation/gma_mediation_chartboost/**"
- ".github/workflows/gma_mediation_chartboost.yaml"
- "packages/mediation/gma_mediation_chartboost/ios/**"
- "packages/mediation/gma_mediation_chartboost/android/**"
push:
branches:
- main

jobs:
flutter:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
timeout-minutes: 30
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
- name: "Install Flutter"
run: ./.github/workflows/scripts/install-flutter.sh stable
- name: "Install Tools"
run: ./.github/workflows/scripts/install-tools.sh
- name: "Flutter Analyze"
run: |
cd packages/mediation/gma_mediation_chartboost/
flutter analyze
9 changes: 0 additions & 9 deletions .github/workflows/gma_mediation_dtexchange.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,3 @@ jobs:
run: |
cd packages/mediation/gma_mediation_dtexchange
flutter analyze
- name: "Flutter Publish"
run: |
cd packages/mediation/gma_mediation_dtexchange
flutter pub publish --dry-run
- name: "Flutter Format"
run: |
flutter pub global activate flutter_plugin_tools
flutter pub global run flutter_plugin_tools format
./.github/workflows/scripts/validate-formatting.sh
9 changes: 0 additions & 9 deletions .github/workflows/gma_mediation_inmobi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,3 @@ jobs:
run: |
cd packages/mediation/gma_mediation_inmobi
flutter analyze
- name: "Flutter Publish"
run: |
cd packages/mediation/gma_mediation_inmobi
flutter pub publish --dry-run
- name: "Flutter Format"
run: |
flutter pub global activate flutter_plugin_tools
flutter pub global run flutter_plugin_tools format
./.github/workflows/scripts/validate-formatting.sh
9 changes: 0 additions & 9 deletions .github/workflows/gma_mediation_ironsource.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,3 @@ jobs:
run: |
cd packages/mediation/gma_mediation_ironsource
flutter analyze
- name: "Flutter Publish"
run: |
cd packages/mediation/gma_mediation_ironsource
flutter pub publish --dry-run
- name: "Flutter Format"
run: |
flutter pub global activate flutter_plugin_tools
flutter pub global run flutter_plugin_tools format
./.github/workflows/scripts/validate-formatting.sh
9 changes: 0 additions & 9 deletions .github/workflows/gma_mediation_liftoffmonetize.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,3 @@ jobs:
run: |
cd packages/mediation/gma_mediation_liftoffmonetize
flutter analyze
- name: "Flutter Publish"
run: |
cd packages/mediation/gma_mediation_liftoffmonetize
flutter pub publish --dry-run
- name: "Flutter Format"
run: |
flutter pub global activate flutter_plugin_tools
flutter pub global run flutter_plugin_tools format
./.github/workflows/scripts/validate-formatting.sh
9 changes: 0 additions & 9 deletions .github/workflows/gma_mediation_meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,3 @@ jobs:
run: |
cd packages/mediation/gma_mediation_meta
flutter analyze
- name: "Flutter Publish"
run: |
cd packages/mediation/gma_mediation_meta
flutter pub publish --dry-run
- name: "Flutter Format"
run: |
flutter pub global activate flutter_plugin_tools
flutter pub global run flutter_plugin_tools format
./.github/workflows/scripts/validate-formatting.sh
9 changes: 0 additions & 9 deletions .github/workflows/gma_mediation_mintegral.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,3 @@ jobs:
run: |
cd packages/mediation/gma_mediation_mintegral
flutter analyze
- name: "Flutter Publish"
run: |
cd packages/mediation/gma_mediation_mintegral
flutter pub publish --dry-run
- name: "Flutter Format"
run: |
flutter pub global activate flutter_plugin_tools
flutter pub global run flutter_plugin_tools format
./.github/workflows/scripts/validate-formatting.sh
9 changes: 0 additions & 9 deletions .github/workflows/gma_mediation_pangle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,3 @@ jobs:
run: |
cd packages/mediation/gma_mediation_pangle/
flutter analyze
- name: "Flutter Publish"
run: |
cd packages/mediation/gma_mediation_pangle/
flutter pub publish --dry-run
- name: "Flutter Format"
run: |
flutter pub global activate flutter_plugin_tools
flutter pub global run flutter_plugin_tools format
./.github/workflows/scripts/validate-formatting.sh
9 changes: 0 additions & 9 deletions .github/workflows/gma_mediation_unity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,3 @@ jobs:
run: |
cd packages/mediation/gma_mediation_unity/
flutter analyze
- name: "Flutter Publish"
run: |
cd packages/mediation/gma_mediation_unity/
flutter pub publish --dry-run
- name: "Flutter Format"
run: |
flutter pub global activate flutter_plugin_tools
flutter pub global run flutter_plugin_tools format
./.github/workflows/scripts/validate-formatting.sh
3 changes: 1 addition & 2 deletions .github/workflows/google_mobile_ads.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,5 @@ jobs:
flutter pub publish --dry-run
- name: "Flutter Format"
run: |
flutter pub global activate flutter_plugin_tools
flutter pub global run flutter_plugin_tools format
dart format packages/google_mobile_ads/
./.github/workflows/scripts/validate-formatting.sh
10 changes: 5 additions & 5 deletions samples/admob/app_open_example/lib/consent_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ConsentManager {
/// Helper variable to determine if the privacy options form is required.
Future<bool> isPrivacyOptionsRequired() async {
return await ConsentInformation.instance
.getPrivacyOptionsRequirementStatus() ==
.getPrivacyOptionsRequirementStatus() ==
PrivacyOptionsRequirementStatus.required;
}

Expand All @@ -30,10 +30,10 @@ class ConsentManager {
OnConsentGatheringCompleteListener onConsentGatheringCompleteListener) {
// For testing purposes, you can force a DebugGeography of Eea or NotEea.
ConsentDebugSettings debugSettings = ConsentDebugSettings(
// debugGeography: DebugGeography.debugGeographyEea,
);
// debugGeography: DebugGeography.debugGeographyEea,
);
ConsentRequestParameters params =
ConsentRequestParameters(consentDebugSettings: debugSettings);
ConsentRequestParameters(consentDebugSettings: debugSettings);

// Requesting an update to consent information should be called on every app launch.
ConsentInformation.instance.requestConsentInfoUpdate(params, () async {
Expand All @@ -51,4 +51,4 @@ class ConsentManager {
OnConsentFormDismissedListener onConsentFormDismissedListener) {
ConsentForm.showPrivacyOptionsForm(onConsentFormDismissedListener);
}
}
}
9 changes: 4 additions & 5 deletions samples/admob/banner_example/lib/consent_manager.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import 'dart:async';

import 'package:google_mobile_ads/google_mobile_ads.dart';
Expand All @@ -18,7 +17,7 @@ class ConsentManager {
/// Helper variable to determine if the privacy options form is required.
Future<bool> isPrivacyOptionsRequired() async {
return await ConsentInformation.instance
.getPrivacyOptionsRequirementStatus() ==
.getPrivacyOptionsRequirementStatus() ==
PrivacyOptionsRequirementStatus.required;
}

Expand All @@ -28,10 +27,10 @@ class ConsentManager {
OnConsentGatheringCompleteListener onConsentGatheringCompleteListener) {
// For testing purposes, you can force a DebugGeography of Eea or NotEea.
ConsentDebugSettings debugSettings = ConsentDebugSettings(
// debugGeography: DebugGeography.debugGeographyEea,
);
// debugGeography: DebugGeography.debugGeographyEea,
);
ConsentRequestParameters params =
ConsentRequestParameters(consentDebugSettings: debugSettings);
ConsentRequestParameters(consentDebugSettings: debugSettings);

// Requesting an update to consent information should be called on every app launch.
ConsentInformation.instance.requestConsentInfoUpdate(params, () async {
Expand Down
4 changes: 2 additions & 2 deletions samples/admob/interstitial_example/lib/consent_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ class ConsentManager {
OnConsentGatheringCompleteListener onConsentGatheringCompleteListener) {
// For testing purposes, you can force a DebugGeography of Eea or NotEea.
ConsentDebugSettings debugSettings = ConsentDebugSettings(
// debugGeography: DebugGeography.debugGeographyEea,
);
// debugGeography: DebugGeography.debugGeographyEea,
);
ConsentRequestParameters params =
ConsentRequestParameters(consentDebugSettings: debugSettings);

Expand Down
1 change: 1 addition & 0 deletions samples/admob/mediation_example/lib/app_bar_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ class AppBarItem {

/// Button text.
final String label;

/// Button value.
final int value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ConsentManager {
/// Helper variable to determine if the privacy options form is required.
Future<bool> isPrivacyOptionsRequired() async {
return await ConsentInformation.instance
.getPrivacyOptionsRequirementStatus() ==
.getPrivacyOptionsRequirementStatus() ==
PrivacyOptionsRequirementStatus.required;
}

Expand All @@ -27,10 +27,10 @@ class ConsentManager {
OnConsentGatheringCompleteListener onConsentGatheringCompleteListener) {
// For testing purposes, you can force a DebugGeography of Eea or NotEea.
ConsentDebugSettings debugSettings = ConsentDebugSettings(
// debugGeography: DebugGeography.debugGeographyEea,
);
// debugGeography: DebugGeography.debugGeographyEea,
);
ConsentRequestParameters params =
ConsentRequestParameters(consentDebugSettings: debugSettings);
ConsentRequestParameters(consentDebugSettings: debugSettings);

// Requesting an update to consent information should be called on every app launch.
ConsentInformation.instance.requestConsentInfoUpdate(params, () async {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ConsentManager {
/// Helper variable to determine if the privacy options form is required.
Future<bool> isPrivacyOptionsRequired() async {
return await ConsentInformation.instance
.getPrivacyOptionsRequirementStatus() ==
.getPrivacyOptionsRequirementStatus() ==
PrivacyOptionsRequirementStatus.required;
}

Expand All @@ -27,10 +27,10 @@ class ConsentManager {
OnConsentGatheringCompleteListener onConsentGatheringCompleteListener) {
// For testing purposes, you can force a DebugGeography of Eea or NotEea.
ConsentDebugSettings debugSettings = ConsentDebugSettings(
// debugGeography: DebugGeography.debugGeographyEea,
);
// debugGeography: DebugGeography.debugGeographyEea,
);
ConsentRequestParameters params =
ConsentRequestParameters(consentDebugSettings: debugSettings);
ConsentRequestParameters(consentDebugSettings: debugSettings);

// Requesting an update to consent information should be called on every app launch.
ConsentInformation.instance.requestConsentInfoUpdate(params, () async {
Expand Down
4 changes: 2 additions & 2 deletions samples/admob/rewarded_example/lib/consent_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ConsentManager {
/// Helper variable to determine if the privacy options form is required.
Future<bool> isPrivacyOptionsRequired() async {
return await ConsentInformation.instance
.getPrivacyOptionsRequirementStatus() ==
.getPrivacyOptionsRequirementStatus() ==
PrivacyOptionsRequirementStatus.required;
}

Expand All @@ -30,7 +30,7 @@ class ConsentManager {
debugGeography: DebugGeography.debugGeographyEea,
);
ConsentRequestParameters params =
ConsentRequestParameters(consentDebugSettings: debugSettings);
ConsentRequestParameters(consentDebugSettings: debugSettings);

// Requesting an update to consent information should be called on every app launch.
ConsentInformation.instance.requestConsentInfoUpdate(params, () async {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ConsentManager {
/// Helper variable to determine if the privacy options form is required.
Future<bool> isPrivacyOptionsRequired() async {
return await ConsentInformation.instance
.getPrivacyOptionsRequirementStatus() ==
.getPrivacyOptionsRequirementStatus() ==
PrivacyOptionsRequirementStatus.required;
}

Expand All @@ -27,10 +27,10 @@ class ConsentManager {
OnConsentGatheringCompleteListener onConsentGatheringCompleteListener) {
// For testing purposes, you can force a DebugGeography of Eea or NotEea.
ConsentDebugSettings debugSettings = ConsentDebugSettings(
// debugGeography: DebugGeography.debugGeographyEea,
);
// debugGeography: DebugGeography.debugGeographyEea,
);
ConsentRequestParameters params =
ConsentRequestParameters(consentDebugSettings: debugSettings);
ConsentRequestParameters(consentDebugSettings: debugSettings);

// Requesting an update to consent information should be called on every app launch.
ConsentInformation.instance.requestConsentInfoUpdate(params, () async {
Expand Down
Loading
Loading