From 82c7cbe49bd69b11bb8c709e0048077c87061fbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A6=8A=E5=8E=9F=E6=98=8C=E5=BD=A6?= Date: Wed, 4 Dec 2024 10:18:04 +0900 Subject: [PATCH] chore(fmt): update to use prettier-plugin-java --- .../admob/banner/BannerExecutor.java | 172 +++++++++--------- .../admob/consent/AdConsentExecutor.java | 36 ++-- .../interstitial/AdInterstitialExecutor.java | 38 ++-- .../admob/rewarded/AdRewardExecutor.java | 42 ++--- .../AdRewardInterstitialExecutor.java | 50 +++-- .../community/admob/AdMobTest.java | 33 ++-- .../admob/banner/BannerExecutorTest.java | 8 +- .../AdInterstitialExecutorTest.java | 24 ++- package-lock.json | 2 +- package.json | 14 +- src/index.ts | 2 +- src/web.ts | 4 +- 12 files changed, 198 insertions(+), 227 deletions(-) diff --git a/android/src/main/java/com/getcapacitor/community/admob/banner/BannerExecutor.java b/android/src/main/java/com/getcapacitor/community/admob/banner/BannerExecutor.java index c979869f..2d05a1e3 100644 --- a/android/src/main/java/com/getcapacitor/community/admob/banner/BannerExecutor.java +++ b/android/src/main/java/com/getcapacitor/community/admob/banner/BannerExecutor.java @@ -140,20 +140,18 @@ public void hideBanner(final PluginCall call) { try { activitySupplier .get() - .runOnUiThread( - () -> { - if (mAdViewLayout != null) { - mAdViewLayout.setVisibility(View.GONE); - mAdView.pause(); + .runOnUiThread(() -> { + if (mAdViewLayout != null) { + mAdViewLayout.setVisibility(View.GONE); + mAdView.pause(); - final BannerAdSizeInfo sizeInfo = new BannerAdSizeInfo(0, 0); + final BannerAdSizeInfo sizeInfo = new BannerAdSizeInfo(0, 0); - notifyListeners(BannerAdPluginEvents.SizeChanged.getWebEventName(), sizeInfo); + notifyListeners(BannerAdPluginEvents.SizeChanged.getWebEventName(), sizeInfo); - call.resolve(); - } + call.resolve(); } - ); + }); } catch (Exception ex) { call.reject(ex.getLocalizedMessage(), ex); } @@ -163,19 +161,17 @@ public void resumeBanner(final PluginCall call) { try { activitySupplier .get() - .runOnUiThread( - () -> { - if (mAdViewLayout != null && mAdView != null) { - mAdViewLayout.setVisibility(View.VISIBLE); - mAdView.resume(); + .runOnUiThread(() -> { + if (mAdViewLayout != null && mAdView != null) { + mAdViewLayout.setVisibility(View.VISIBLE); + mAdView.resume(); - final BannerAdSizeInfo sizeInfo = new BannerAdSizeInfo(mAdView); - notifyListeners(BannerAdPluginEvents.SizeChanged.getWebEventName(), sizeInfo); + final BannerAdSizeInfo sizeInfo = new BannerAdSizeInfo(mAdView); + notifyListeners(BannerAdPluginEvents.SizeChanged.getWebEventName(), sizeInfo); - Log.d(logTag, "Banner AD Resumed"); - } + Log.d(logTag, "Banner AD Resumed"); } - ); + }); call.resolve(); } catch (Exception ex) { @@ -188,19 +184,17 @@ public void removeBanner(final PluginCall call) { if (mAdView != null) { activitySupplier .get() - .runOnUiThread( - () -> { - if (mAdView != null) { - mViewGroup.removeView(mAdViewLayout); - mAdViewLayout.removeView(mAdView); - mAdView.destroy(); - mAdView = null; - Log.d(logTag, "Banner AD Removed"); - final BannerAdSizeInfo sizeInfo = new BannerAdSizeInfo(0, 0); - notifyListeners(BannerAdPluginEvents.SizeChanged.getWebEventName(), sizeInfo); - } + .runOnUiThread(() -> { + if (mAdView != null) { + mViewGroup.removeView(mAdViewLayout); + mAdViewLayout.removeView(mAdView); + mAdView.destroy(); + mAdView = null; + Log.d(logTag, "Banner AD Removed"); + final BannerAdSizeInfo sizeInfo = new BannerAdSizeInfo(0, 0); + notifyListeners(BannerAdPluginEvents.SizeChanged.getWebEventName(), sizeInfo); } - ); + }); } call.resolve(); @@ -212,12 +206,10 @@ public void removeBanner(final PluginCall call) { private void updateExistingAdView(AdOptions adOptions) { activitySupplier .get() - .runOnUiThread( - () -> { - final AdRequest adRequest = RequestHelper.createRequest(adOptions); - mAdView.loadAd(adRequest); - } - ); + .runOnUiThread(() -> { + final AdRequest adRequest = RequestHelper.createRequest(adOptions); + mAdView.loadAd(adRequest); + }); } /** @@ -228,67 +220,65 @@ private void createNewAdView(AdOptions adOptions) { // Run AdMob In Main UI Thread activitySupplier .get() - .runOnUiThread( - () -> { - final AdRequest adRequest = RequestHelper.createRequest(adOptions); - // Assign the correct id needed - AdViewIdHelper.assignIdToAdView(mAdView, adOptions, adRequest, logTag, contextSupplier.get()); - // Add the AdView to the view hierarchy. - mAdViewLayout.addView(mAdView); - // Start loading the ad. - mAdView.loadAd(adRequest); - mAdView.setAdListener( - new AdListener() { - @Override - public void onAdLoaded() { - final BannerAdSizeInfo sizeInfo = new BannerAdSizeInfo(mAdView); - - notifyListeners(BannerAdPluginEvents.SizeChanged.getWebEventName(), sizeInfo); - notifyListeners(BannerAdPluginEvents.Loaded.getWebEventName(), emptyObject); - super.onAdLoaded(); - } + .runOnUiThread(() -> { + final AdRequest adRequest = RequestHelper.createRequest(adOptions); + // Assign the correct id needed + AdViewIdHelper.assignIdToAdView(mAdView, adOptions, adRequest, logTag, contextSupplier.get()); + // Add the AdView to the view hierarchy. + mAdViewLayout.addView(mAdView); + // Start loading the ad. + mAdView.loadAd(adRequest); + mAdView.setAdListener( + new AdListener() { + @Override + public void onAdLoaded() { + final BannerAdSizeInfo sizeInfo = new BannerAdSizeInfo(mAdView); + + notifyListeners(BannerAdPluginEvents.SizeChanged.getWebEventName(), sizeInfo); + notifyListeners(BannerAdPluginEvents.Loaded.getWebEventName(), emptyObject); + super.onAdLoaded(); + } - @Override - public void onAdFailedToLoad(@NonNull LoadAdError adError) { - if (mAdView != null) { - mViewGroup.removeView(mAdViewLayout); - mAdViewLayout.removeView(mAdView); - mAdView.destroy(); - mAdView = null; - } + @Override + public void onAdFailedToLoad(@NonNull LoadAdError adError) { + if (mAdView != null) { + mViewGroup.removeView(mAdViewLayout); + mAdViewLayout.removeView(mAdView); + mAdView.destroy(); + mAdView = null; + } - final BannerAdSizeInfo sizeInfo = new BannerAdSizeInfo(0, 0); - notifyListeners(BannerAdPluginEvents.SizeChanged.getWebEventName(), sizeInfo); + final BannerAdSizeInfo sizeInfo = new BannerAdSizeInfo(0, 0); + notifyListeners(BannerAdPluginEvents.SizeChanged.getWebEventName(), sizeInfo); - final AdMobPluginError adMobPluginError = new AdMobPluginError(adError); - notifyListeners(BannerAdPluginEvents.FailedToLoad.getWebEventName(), adMobPluginError); + final AdMobPluginError adMobPluginError = new AdMobPluginError(adError); + notifyListeners(BannerAdPluginEvents.FailedToLoad.getWebEventName(), adMobPluginError); - super.onAdFailedToLoad(adError); - } + super.onAdFailedToLoad(adError); + } - @Override - public void onAdOpened() { - notifyListeners(BannerAdPluginEvents.Opened.getWebEventName(), emptyObject); - super.onAdOpened(); - } + @Override + public void onAdOpened() { + notifyListeners(BannerAdPluginEvents.Opened.getWebEventName(), emptyObject); + super.onAdOpened(); + } - @Override - public void onAdClosed() { - notifyListeners(BannerAdPluginEvents.Closed.getWebEventName(), emptyObject); - super.onAdClosed(); - } + @Override + public void onAdClosed() { + notifyListeners(BannerAdPluginEvents.Closed.getWebEventName(), emptyObject); + super.onAdClosed(); + } - @Override - public void onAdImpression() { - notifyListeners(BannerAdPluginEvents.AdImpression.getWebEventName(), emptyObject); - super.onAdImpression(); - } + @Override + public void onAdImpression() { + notifyListeners(BannerAdPluginEvents.AdImpression.getWebEventName(), emptyObject); + super.onAdImpression(); } - ); + } + ); - // Add AdViewLayout top of the WebView - mViewGroup.addView(mAdViewLayout); - } - ); + // Add AdViewLayout top of the WebView + mViewGroup.addView(mAdViewLayout); + }); } } diff --git a/android/src/main/java/com/getcapacitor/community/admob/consent/AdConsentExecutor.java b/android/src/main/java/com/getcapacitor/community/admob/consent/AdConsentExecutor.java index e4b137fc..b23098fe 100644 --- a/android/src/main/java/com/getcapacitor/community/admob/consent/AdConsentExecutor.java +++ b/android/src/main/java/com/getcapacitor/community/admob/consent/AdConsentExecutor.java @@ -90,26 +90,22 @@ public void showConsentForm(final PluginCall call, BiConsumer ensureConsentInfo(); activitySupplier .get() - .runOnUiThread( - () -> - UserMessagingPlatform.loadConsentForm( - contextSupplier.get(), - consentForm -> - consentForm.show( - activitySupplier.get(), - formError -> { - if (formError != null) { - call.reject("Error when show consent form", formError.getMessage()); - } else { - JSObject consentFormInfo = new JSObject(); - consentFormInfo.put("status", getConsentStatusString(consentInformation.getConsentStatus())); - - call.resolve(consentFormInfo); - } - } - ), - formError -> call.reject("Error when show consent form", formError.getMessage()) - ) + .runOnUiThread(() -> + UserMessagingPlatform.loadConsentForm( + contextSupplier.get(), + consentForm -> + consentForm.show(activitySupplier.get(), formError -> { + if (formError != null) { + call.reject("Error when show consent form", formError.getMessage()); + } else { + JSObject consentFormInfo = new JSObject(); + consentFormInfo.put("status", getConsentStatusString(consentInformation.getConsentStatus())); + + call.resolve(consentFormInfo); + } + }), + formError -> call.reject("Error when show consent form", formError.getMessage()) + ) ); } catch (Exception ex) { call.reject(ex.getLocalizedMessage(), ex); diff --git a/android/src/main/java/com/getcapacitor/community/admob/interstitial/AdInterstitialExecutor.java b/android/src/main/java/com/getcapacitor/community/admob/interstitial/AdInterstitialExecutor.java index c9c78b00..f2d0a1ee 100644 --- a/android/src/main/java/com/getcapacitor/community/admob/interstitial/AdInterstitialExecutor.java +++ b/android/src/main/java/com/getcapacitor/community/admob/interstitial/AdInterstitialExecutor.java @@ -38,18 +38,16 @@ public void prepareInterstitial(final PluginCall call, BiConsumer { - final AdRequest adRequest = RequestHelper.createRequest(adOptions); - final String id = AdViewIdHelper.getFinalAdId(adOptions, adRequest, logTag, contextSupplier.get()); - InterstitialAd.load( - activitySupplier.get(), - id, - adRequest, - adCallbackAndListeners.getInterstitialAdLoadCallback(call, notifyListenersFunction) - ); - } - ); + .runOnUiThread(() -> { + final AdRequest adRequest = RequestHelper.createRequest(adOptions); + final String id = AdViewIdHelper.getFinalAdId(adOptions, adRequest, logTag, contextSupplier.get()); + InterstitialAd.load( + activitySupplier.get(), + id, + adRequest, + adCallbackAndListeners.getInterstitialAdLoadCallback(call, notifyListenersFunction) + ); + }); } catch (Exception ex) { call.reject(ex.getLocalizedMessage(), ex); } @@ -66,15 +64,13 @@ public void showInterstitial(final PluginCall call, BiConsumer activitySupplier .get() - .runOnUiThread( - () -> { - try { - interstitialAd.show(activitySupplier.get()); - call.resolve(); - } catch (Exception ex) { - call.reject(ex.getLocalizedMessage(), ex); - } + .runOnUiThread(() -> { + try { + interstitialAd.show(activitySupplier.get()); + call.resolve(); + } catch (Exception ex) { + call.reject(ex.getLocalizedMessage(), ex); } - ); + }); } } diff --git a/android/src/main/java/com/getcapacitor/community/admob/rewarded/AdRewardExecutor.java b/android/src/main/java/com/getcapacitor/community/admob/rewarded/AdRewardExecutor.java index f9fbaf00..3c8c3a51 100644 --- a/android/src/main/java/com/getcapacitor/community/admob/rewarded/AdRewardExecutor.java +++ b/android/src/main/java/com/getcapacitor/community/admob/rewarded/AdRewardExecutor.java @@ -34,22 +34,20 @@ public void prepareRewardVideoAd(final PluginCall call, BiConsumer { - try { - final AdRequest adRequest = RequestHelper.createRequest(adOptions); - final String id = AdViewIdHelper.getFinalAdId(adOptions, adRequest, logTag, contextSupplier.get()); - RewardedAd.load( - contextSupplier.get(), - id, - adRequest, - RewardedAdCallbackAndListeners.INSTANCE.getRewardedAdLoadCallback(call, notifyListenersFunction, adOptions) - ); - } catch (Exception ex) { - call.reject(ex.getLocalizedMessage(), ex); - } + .runOnUiThread(() -> { + try { + final AdRequest adRequest = RequestHelper.createRequest(adOptions); + final String id = AdViewIdHelper.getFinalAdId(adOptions, adRequest, logTag, contextSupplier.get()); + RewardedAd.load( + contextSupplier.get(), + id, + adRequest, + RewardedAdCallbackAndListeners.INSTANCE.getRewardedAdLoadCallback(call, notifyListenersFunction, adOptions) + ); + } catch (Exception ex) { + call.reject(ex.getLocalizedMessage(), ex); } - ); + }); } @PluginMethod @@ -65,14 +63,12 @@ public void showRewardVideoAd(final PluginCall call, BiConsumer { - mRewardedAd.show( - activitySupplier.get(), - RewardedAdCallbackAndListeners.INSTANCE.getOnUserEarnedRewardListener(call, notifyListenersFunction) - ); - } - ); + .runOnUiThread(() -> { + mRewardedAd.show( + activitySupplier.get(), + RewardedAdCallbackAndListeners.INSTANCE.getOnUserEarnedRewardListener(call, notifyListenersFunction) + ); + }); } catch (Exception ex) { call.reject(ex.getLocalizedMessage(), ex); } diff --git a/android/src/main/java/com/getcapacitor/community/admob/rewardedinterstitial/AdRewardInterstitialExecutor.java b/android/src/main/java/com/getcapacitor/community/admob/rewardedinterstitial/AdRewardInterstitialExecutor.java index a315d61b..2bdc4570 100644 --- a/android/src/main/java/com/getcapacitor/community/admob/rewardedinterstitial/AdRewardInterstitialExecutor.java +++ b/android/src/main/java/com/getcapacitor/community/admob/rewardedinterstitial/AdRewardInterstitialExecutor.java @@ -34,26 +34,24 @@ public void prepareRewardInterstitialAd(final PluginCall call, BiConsumer { - try { - final AdRequest adRequest = RequestHelper.createRequest(adOptions); - final String id = AdViewIdHelper.getFinalAdId(adOptions, adRequest, logTag, contextSupplier.get()); - RewardedInterstitialAd.load( - contextSupplier.get(), - id, - adRequest, - RewardedInterstitialAdCallbackAndListeners.INSTANCE.getRewardedAdLoadCallback( - call, - notifyListenersFunction, - adOptions - ) - ); - } catch (Exception ex) { - call.reject(ex.getLocalizedMessage(), ex); - } + .runOnUiThread(() -> { + try { + final AdRequest adRequest = RequestHelper.createRequest(adOptions); + final String id = AdViewIdHelper.getFinalAdId(adOptions, adRequest, logTag, contextSupplier.get()); + RewardedInterstitialAd.load( + contextSupplier.get(), + id, + adRequest, + RewardedInterstitialAdCallbackAndListeners.INSTANCE.getRewardedAdLoadCallback( + call, + notifyListenersFunction, + adOptions + ) + ); + } catch (Exception ex) { + call.reject(ex.getLocalizedMessage(), ex); } - ); + }); } @PluginMethod @@ -69,14 +67,12 @@ public void showRewardInterstitialAd(final PluginCall call, BiConsumer { - mRewardedInterstitialAd.show( - activitySupplier.get(), - RewardedInterstitialAdCallbackAndListeners.INSTANCE.getOnUserEarnedRewardListener(call, notifyListenersFunction) - ); - } - ); + .runOnUiThread(() -> { + mRewardedInterstitialAd.show( + activitySupplier.get(), + RewardedInterstitialAdCallbackAndListeners.INSTANCE.getOnUserEarnedRewardListener(call, notifyListenersFunction) + ); + }); } catch (Exception ex) { call.reject(ex.getLocalizedMessage(), ex); } diff --git a/android/src/test/java/com/getcapacitor/community/admob/AdMobTest.java b/android/src/test/java/com/getcapacitor/community/admob/AdMobTest.java index abc7fc68..73c8ddbe 100644 --- a/android/src/test/java/com/getcapacitor/community/admob/AdMobTest.java +++ b/android/src/test/java/com/getcapacitor/community/admob/AdMobTest.java @@ -48,23 +48,22 @@ public class AdMobTest { public void beforeEach() { reset(pluginCallMock, mockedContext); - sut = - new AdMob() { - @Override - public Context getContext() { - return mockedContext; - } - - @Override - public AppCompatActivity getActivity() { - return mockedActivity; - } - - @Override - public String getLogTag() { - return "LogTag"; - } - }; + sut = new AdMob() { + @Override + public Context getContext() { + return mockedContext; + } + + @Override + public AppCompatActivity getActivity() { + return mockedActivity; + } + + @Override + public String getLogTag() { + return "LogTag"; + } + }; } @AfterEach diff --git a/android/src/test/java/com/getcapacitor/community/admob/banner/BannerExecutorTest.java b/android/src/test/java/com/getcapacitor/community/admob/banner/BannerExecutorTest.java index 9c93d9ae..4b25d04f 100644 --- a/android/src/test/java/com/getcapacitor/community/admob/banner/BannerExecutorTest.java +++ b/android/src/test/java/com/getcapacitor/community/admob/banner/BannerExecutorTest.java @@ -69,13 +69,7 @@ class BannerExecutorTest { void beforeEach() { AdSizeStaticMock = Mockito.mockStatic(AdSize.class); reset(contextMock, activityMock, notifierMock); - adViewMockedConstruction = - Mockito.mockConstruction( - AdView.class, - (mock, context) -> { - // when(mock.setAdSize(any(AdSize.cl))).thenReturn(null); - } - ); + adViewMockedConstruction = Mockito.mockConstruction(AdView.class, (mock, context) -> {}); when(activityMock.findViewById(anyInt())).thenReturn(viewGroupMock); when(viewGroupMock.getChildAt(anyInt())).thenReturn(viewGroupMock); diff --git a/android/src/test/java/com/getcapacitor/community/admob/interstitial/AdInterstitialExecutorTest.java b/android/src/test/java/com/getcapacitor/community/admob/interstitial/AdInterstitialExecutorTest.java index cb608e60..7b4697c1 100644 --- a/android/src/test/java/com/getcapacitor/community/admob/interstitial/AdInterstitialExecutorTest.java +++ b/android/src/test/java/com/getcapacitor/community/admob/interstitial/AdInterstitialExecutorTest.java @@ -65,8 +65,13 @@ class AdInterstitialExecutorTest { void beforeEach() { runnableArgumentCaptor = ArgumentCaptor.forClass(Runnable.class); - sut = - new AdInterstitialExecutor(() -> context, () -> mockedActivity, notifierMock, LOG_TAG, interstitialAdCallbackAndListenersMock); + sut = new AdInterstitialExecutor( + () -> context, + () -> mockedActivity, + notifierMock, + LOG_TAG, + interstitialAdCallbackAndListenersMock + ); } @AfterEach @@ -141,8 +146,7 @@ void usesIdHelper() { Runnable uiThreadRunnable = runnableArgumentCaptor.getValue(); uiThreadRunnable.run(); - interstitialAdMockedStatic.verify( - () -> InterstitialAd.load(any(), idArgumentCaptor.capture(), adRequestCaptor.capture(), any()) + interstitialAdMockedStatic.verify(() -> InterstitialAd.load(any(), idArgumentCaptor.capture(), adRequestCaptor.capture(), any()) ); assertEquals(idFromViewHelper, idArgumentCaptor.getValue()); @@ -152,8 +156,9 @@ void usesIdHelper() { @Test @DisplayName("loads the ad with the InterstitialAdLoadCallback returned by the getInterstitialAdLoadCallback singleton") void usesCallbackHelper() { - when(interstitialAdCallbackAndListenersMock.getInterstitialAdLoadCallback(pluginCallMock, notifierMock)) - .thenReturn(interstitialAdLoadCallbackMock); + when(interstitialAdCallbackAndListenersMock.getInterstitialAdLoadCallback(pluginCallMock, notifierMock)).thenReturn( + interstitialAdLoadCallbackMock + ); final ArgumentCaptor callbackArgumentCaptor = ArgumentCaptor.forClass( InterstitialAdLoadCallback.class ); @@ -202,9 +207,10 @@ void emitsFailToShowWhenNoInterstitialWasLoaded() { sut.showInterstitial(pluginCallMock, notifierMock); - Mockito - .verify(notifierMock) - .accept(ArgumentMatchers.eq(InterstitialAdPluginPluginEvent.FailedToLoad), argumentCaptor.capture()); + Mockito.verify(notifierMock).accept( + ArgumentMatchers.eq(InterstitialAdPluginPluginEvent.FailedToLoad), + argumentCaptor.capture() + ); JSObject emittedError = argumentCaptor.getValue(); diff --git a/package-lock.json b/package-lock.json index 966f9c5c..eb780c41 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,7 +27,7 @@ "np": "^8.0.4", "pre-commit": "^1.2.2", "prettier": "^3.3.3", - "prettier-plugin-java": "^2.6.4", + "prettier-plugin-java": "^2.6.5", "rimraf": "^6.0.1", "rollup": "^4.24.0", "swiftlint": "^2.0.0", diff --git a/package.json b/package.json index 2f06c5cf..5e9beac1 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint", "fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format", "eslint": "eslint src/. --ext ts", - "prettier": "prettier \"{src/*.ts,**/*.java}\"", + "prettier": "prettier \"{src/*.ts,**/*.java}\" --plugin=prettier-plugin-java", "swiftlint": "node-swiftlint", "docgen": "docgen --api AdMobPlugin --output-readme README.md --output-json dist/docs.json", "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs", @@ -51,17 +51,17 @@ "@capacitor/core": "^6.0.0", "@capacitor/docgen": "git+https://github.com/rdlabo/capacitor-docgen.git#feat/support_extends_build", "@capacitor/ios": "^6.0.0", - "husky": "^9.1.7", - "lint-staged": "^15.2.10", - "np": "^8.0.4", - "pre-commit": "^1.2.2", - "@typescript-eslint/eslint-plugin": "^5.27.1", "@ionic/eslint-config": "^0.4.0", "@ionic/prettier-config": "^4.0.0", "@ionic/swiftlint-config": "^2.0.0", + "@typescript-eslint/eslint-plugin": "^5.27.1", "eslint": "^8.57.0", + "husky": "^9.1.7", + "lint-staged": "^15.2.10", + "np": "^8.0.4", + "pre-commit": "^1.2.2", "prettier": "^3.3.3", - "prettier-plugin-java": "^2.6.4", + "prettier-plugin-java": "^2.6.5", "rimraf": "^6.0.1", "rollup": "^4.24.0", "swiftlint": "^2.0.0", diff --git a/src/index.ts b/src/index.ts index 0f24d25d..fef4da63 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,7 +3,7 @@ import { registerPlugin } from '@capacitor/core'; import type { AdMobPlugin } from './definitions'; const AdMob = registerPlugin('AdMob', { - web: () => import('./web').then(m => new m.AdMobWeb()), + web: () => import('./web').then((m) => new m.AdMobWeb()), }); export * from './definitions'; diff --git a/src/web.ts b/src/web.ts index 622220cd..27db29e6 100644 --- a/src/web.ts +++ b/src/web.ts @@ -27,9 +27,7 @@ export class AdMobWeb extends WebPlugin implements AdMobPlugin { }; } - async requestConsentInfo( - options?: AdmobConsentRequestOptions, - ): Promise { + async requestConsentInfo(options?: AdmobConsentRequestOptions): Promise { console.log('requestConsentInfo', options); return { status: AdmobConsentStatus.REQUIRED,