From 66850ca25c58e58b7d11a4242022c5253e7d8f8a Mon Sep 17 00:00:00 2001 From: Morteza Nedaei Date: Tue, 23 Jul 2024 13:28:14 +0000 Subject: [PATCH] Update plugin version to 1.0.1-beta06 --- .github/workflows/publish.yml | 57 ++ .gitignore | 43 ++ CHANGELOG.md | 3 + README.md | 35 + analysis_options.yaml | 28 + android/.gitignore | 13 + android/app/build.gradle | 102 +++ android/app/gradle.properties | 5 + android/app/src/debug/AndroidManifest.xml | 7 + android/app/src/main/AndroidManifest.xml | 33 + .../tapsell/mediation/sample/MainActivity.kt | 6 + .../res/drawable-v21/launch_background.xml | 12 + .../main/res/drawable/launch_background.xml | 12 + .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 544 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 442 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 721 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 1031 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 1443 bytes .../app/src/main/res/values-night/styles.xml | 18 + android/app/src/main/res/values/styles.xml | 18 + android/app/src/profile/AndroidManifest.xml | 7 + android/build.gradle | 38 + android/gradle.properties | 3 + .../gradle/wrapper/gradle-wrapper.properties | 5 + android/settings.gradle | 30 + integration_test/plugin_integration_test.dart | 24 + lib/ad/tapsell_mediation_keys.dart | 65 ++ lib/main.dart | 76 ++ lib/navigation/routes.dart | 7 + lib/screens/banner.dart | 76 ++ lib/screens/home.dart | 42 ++ lib/screens/interstitial.dart | 74 ++ lib/screens/rewarded.dart | 77 ++ pubspec.lock | 681 ++++++++++++++++++ pubspec.yaml | 103 +++ test/widget_test.dart | 27 + 36 files changed, 1727 insertions(+) create mode 100644 .github/workflows/publish.yml create mode 100644 .gitignore create mode 100644 CHANGELOG.md create mode 100644 README.md create mode 100644 analysis_options.yaml create mode 100644 android/.gitignore create mode 100644 android/app/build.gradle create mode 100644 android/app/gradle.properties create mode 100644 android/app/src/debug/AndroidManifest.xml create mode 100644 android/app/src/main/AndroidManifest.xml create mode 100644 android/app/src/main/kotlin/ir/tapsell/mediation/sample/MainActivity.kt create mode 100644 android/app/src/main/res/drawable-v21/launch_background.xml create mode 100644 android/app/src/main/res/drawable/launch_background.xml create mode 100644 android/app/src/main/res/mipmap-hdpi/ic_launcher.png create mode 100644 android/app/src/main/res/mipmap-mdpi/ic_launcher.png create mode 100644 android/app/src/main/res/mipmap-xhdpi/ic_launcher.png create mode 100644 android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png create mode 100644 android/app/src/main/res/values-night/styles.xml create mode 100644 android/app/src/main/res/values/styles.xml create mode 100644 android/app/src/profile/AndroidManifest.xml create mode 100644 android/build.gradle create mode 100644 android/gradle.properties create mode 100644 android/gradle/wrapper/gradle-wrapper.properties create mode 100644 android/settings.gradle create mode 100644 integration_test/plugin_integration_test.dart create mode 100644 lib/ad/tapsell_mediation_keys.dart create mode 100644 lib/main.dart create mode 100644 lib/navigation/routes.dart create mode 100644 lib/screens/banner.dart create mode 100644 lib/screens/home.dart create mode 100644 lib/screens/interstitial.dart create mode 100644 lib/screens/rewarded.dart create mode 100644 pubspec.lock create mode 100644 pubspec.yaml create mode 100644 test/widget_test.dart diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..4545d4a --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,57 @@ +# This is a basic workflow to help you get started with Actions + +name: 🚀 Publish Tapsell Mediation Flutter Release TAG + +# Controls when the workflow will run +on: push + +jobs: + build: + name: ⚙️ Release + runs-on: ubuntu-latest + steps: + + - name: 🛠️ Get Current Date + id: date + run: | + echo "::set-output name=date::$(date +'%Y-%m-%d')" + + - name: 🔃 Checkout branch "master" + uses: actions/checkout@v4 + with: + ref: 'master' + + - name: 🔖 Get Flutter Version + id: version + run: | + TAG_VERSION=$(cat pubspec.yaml | grep "version:.*" | awk '{ print $2}') + echo "$TAG_VERSION" + echo "::set-output name=tag_name::v${TAG_VERSION}" + echo "::set-output name=release_name::TapsellMediation-Flutter-v${TAG_VERSION:-Package}" + + + - name: 📢 Prepare Release Notes + id: release_notes + run: | + awk '/^# / {s++} s == 1 {print}' CHANGELOG.md > /tmp/release_notes.md + echo "::set-output name=path::/tmp/release_notes.md" + + + - name: 🛎️ Create Release + TAG + id: release-snapshot + uses: softprops/action-gh-release@v2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ steps.version.outputs.tag_name }} + name: ${{ steps.version.outputs.release_name }} + body: ${{ steps.date.outputs.date }} - See [This doc](https://docs.tapsell.ir/mediation/flutter) to implement the Tapsell SDK into your app. + body_path: ${{ steps.release_notes.outputs.path }} + target_commitish: ${{ github.sha }} + draft: false + prerelease: false + generate_release_notes: true + + files: | + CHANGELOG.md + README.md \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..29a3a50 --- /dev/null +++ b/.gitignore @@ -0,0 +1,43 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.pub-cache/ +.pub/ +/build/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..e7cf3e6 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,3 @@ +## 1.0.1-beta06 + +- Initialized plugin diff --git a/README.md b/README.md new file mode 100644 index 0000000..c739ff2 --- /dev/null +++ b/README.md @@ -0,0 +1,35 @@ +## Getting Started + +[![badge](https://img.shields.io/pub/v/tapsell_mediation.svg)](https://pub.dev/packages/tapsell_mediation) + +Within the android folder of of your Flutter project, open the `app/build.gradle` file and add +the following Tapsell key with the ID from the Tapsell console: + +```groovy +manifestPlaceholders = [ + TapsellMediationAppKey : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + TapsellMediationAppMarket: "APP_MARKETPLACE_NAME", +] +``` + +## Admob + +Within the android folder of of your Flutter project, open the `app/build.gradle` file and add +the following Admob key with the ID from the Tapsell console: + +```groovy +manifestPlaceholders = [ + TapsellMediationAdmobAdapterSignature: "ca-app-pub-xxxxxxxx~xxxxxxxx", +] +``` + +## Applovin + +Within the android folder of of your Flutter project, open the `app/build.gradle` file and add +the following Applovin key with the ID from the Tapsell console: + +```groovy +manifestPlaceholders = [ + TapsellMediationApplovinAdapterSignature: "xxxxxxxx", +] +``` \ No newline at end of file diff --git a/analysis_options.yaml b/analysis_options.yaml new file mode 100644 index 0000000..0d29021 --- /dev/null +++ b/analysis_options.yaml @@ -0,0 +1,28 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at https://dart.dev/lints. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/android/.gitignore b/android/.gitignore new file mode 100644 index 0000000..6f56801 --- /dev/null +++ b/android/.gitignore @@ -0,0 +1,13 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties +**/*.keystore +**/*.jks diff --git a/android/app/build.gradle b/android/app/build.gradle new file mode 100644 index 0000000..0037430 --- /dev/null +++ b/android/app/build.gradle @@ -0,0 +1,102 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} + +def enableProguardInReleaseBuilds = true +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } +} + +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +if (flutterVersionCode == null) { + flutterVersionCode = '1' +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + flutterVersionName = '1.0' +} + +android { + namespace "ir.tapsell.mediation.sample" + compileSdkVersion flutter.compileSdkVersion + ndkVersion flutter.ndkVersion + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = '1.8' + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + defaultConfig { + applicationId "ir.tapsell.mediation.sample" + // You can update the following values to match your application needs. + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. + minSdkVersion 21 + targetSdkVersion flutter.targetSdkVersion + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + + manifestPlaceholders = [ + TapsellMediationAppKey : "76798342-99a7-4a5f-bf5a-60a088d5dcfb", + TapsellMediationAdmobAdapterSignature : "ca-app-pub-3940256099942544~3347511713", + TapsellMediationApplovinAdapterSignature: "5WfZLCGTQmDr6Mf7BBEf5blVwrf8VBMJSmwUSq9-1q5bPpCH_OGAWEP2z2lRkmonLgPzG6gbL4DlvUF9frFmt6", + TapsellMediationAppMarket : "CafeBazaar", + ] + } + + signingConfigs { + debug { + storeFile file('debug.keystore') + storePassword 'android' + keyAlias 'androiddebugkey' + keyPassword 'android' + } + release { + if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) { + storeFile file(MYAPP_RELEASE_STORE_FILE) + storePassword MYAPP_RELEASE_STORE_PASSWORD + keyAlias MYAPP_RELEASE_KEY_ALIAS + keyPassword MYAPP_RELEASE_KEY_PASSWORD + } + } + } + buildTypes { + debug { + signingConfig signingConfigs.debug + } + release { + // `flutter run --release` + signingConfig signingConfigs.release + minifyEnabled enableProguardInReleaseBuilds + proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" + } + } + splits { + abi { + enable true + reset() + include 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a' + universalApk true + } + } +} + +flutter { + source '../..' +} + +dependencies {} diff --git a/android/app/gradle.properties b/android/app/gradle.properties new file mode 100644 index 0000000..96e33a3 --- /dev/null +++ b/android/app/gradle.properties @@ -0,0 +1,5 @@ +# Release info +MYAPP_RELEASE_KEY_ALIAS=Tapsell +MYAPP_RELEASE_KEY_PASSWORD=Tapsell@Release +MYAPP_RELEASE_STORE_FILE=release.keystore +MYAPP_RELEASE_STORE_PASSWORD=Tapsell@Release \ No newline at end of file diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000..399f698 --- /dev/null +++ b/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..a459465 --- /dev/null +++ b/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + diff --git a/android/app/src/main/kotlin/ir/tapsell/mediation/sample/MainActivity.kt b/android/app/src/main/kotlin/ir/tapsell/mediation/sample/MainActivity.kt new file mode 100644 index 0000000..f75d32a --- /dev/null +++ b/android/app/src/main/kotlin/ir/tapsell/mediation/sample/MainActivity.kt @@ -0,0 +1,6 @@ +package ir.tapsell.mediation.sample + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() { +} diff --git a/android/app/src/main/res/drawable-v21/launch_background.xml b/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000..f74085f --- /dev/null +++ b/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/android/app/src/main/res/drawable/launch_background.xml b/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 0000000..304732f --- /dev/null +++ b/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..db77bb4b7b0906d62b1847e87f15cdcacf6a4f29 GIT binary patch literal 544 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY3?!3`olAj~WQl7;NpOBzNqJ&XDuZK6ep0G} zXKrG8YEWuoN@d~6R2!h8bpbvhu0Wd6uZuB!w&u2PAxD2eNXD>P5D~Wn-+_Wa#27Xc zC?Zj|6r#X(-D3u$NCt}(Ms06KgJ4FxJVv{GM)!I~&n8Bnc94O7-Hd)cjDZswgC;Qs zO=b+9!WcT8F?0rF7!Uys2bs@gozCP?z~o%U|N3vA*22NaGQG zlg@K`O_XuxvZ&Ks^m&R!`&1=spLvfx7oGDKDwpwW`#iqdw@AL`7MR}m`rwr|mZgU`8P7SBkL78fFf!WnuYWm$5Z0 zNXhDbCv&49sM544K|?c)WrFfiZvCi9h0O)B3Pgg&ebxsLQ05GG~ AQ2+n{ literal 0 HcmV?d00001 diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..17987b79bb8a35cc66c3c1fd44f5a5526c1b78be GIT binary patch literal 442 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA3?vioaBc-sk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5Xx&nMcT!A!W`0S9QKQy;}1Cl^CgaH=;G9cpY;r$Q>i*pfB zP2drbID<_#qf;rPZx^FqH)F_D#*k@@q03KywUtLX8Ua?`H+NMzkczFPK3lFz@i_kW%1NOn0|D2I9n9wzH8m|-tHjsw|9>@K=iMBhxvkv6m8Y-l zytQ?X=U+MF$@3 zt`~i=@j|6y)RWMK--}M|=T`o&^Ni>IoWKHEbBXz7?A@mgWoL>!*SXo`SZH-*HSdS+ yn*9;$7;m`l>wYBC5bq;=U}IMqLzqbYCidGC!)_gkIk_C@Uy!y&wkt5C($~2D>~)O*cj@FGjOCM)M>_ixfudOh)?xMu#Fs z#}Y=@YDTwOM)x{K_j*Q;dPdJ?Mz0n|pLRx{4n|)f>SXlmV)XB04CrSJn#dS5nK2lM zrZ9#~WelCp7&e13Y$jvaEXHskn$2V!!DN-nWS__6T*l;H&Fopn?A6HZ-6WRLFP=R` zqG+CE#d4|IbyAI+rJJ`&x9*T`+a=p|0O(+s{UBcyZdkhj=yS1>AirP+0R;mf2uMgM zC}@~JfByORAh4SyRgi&!(cja>F(l*O+nd+@4m$|6K6KDn_&uvCpV23&>G9HJp{xgg zoq1^2_p9@|WEo z*X_Uko@K)qYYv~>43eQGMdbiGbo>E~Q& zrYBH{QP^@Sti!`2)uG{irBBq@y*$B zi#&(U-*=fp74j)RyIw49+0MRPMRU)+a2r*PJ$L5roHt2$UjExCTZSbq%V!HeS7J$N zdG@vOZB4v_lF7Plrx+hxo7(fCV&}fHq)$ literal 0 HcmV?d00001 diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..d5f1c8d34e7a88e3f88bea192c3a370d44689c3c GIT binary patch literal 1031 zcmeAS@N?(olHy`uVBq!ia0vp^6F``Q8Ax83A=Cw=BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFa`(sgt!6~Yi|1%a`XoT0ojZ}lNrNjb9xjc(B0U1_% zz5^97Xt*%oq$rQy4?0GKNfJ44uvxI)gC`h-NZ|&0-7(qS@?b!5r36oQ}zyZrNO3 zMO=Or+<~>+A&uN&E!^Sl+>xE!QC-|oJv`ApDhqC^EWD|@=#J`=d#Xzxs4ah}w&Jnc z$|q_opQ^2TrnVZ0o~wh<3t%W&flvYGe#$xqda2bR_R zvPYgMcHgjZ5nSA^lJr%;<&0do;O^tDDh~=pIxA#coaCY>&N%M2^tq^U%3DB@ynvKo}b?yu-bFc-u0JHzced$sg7S3zqI(2 z#Km{dPr7I=pQ5>FuK#)QwK?Y`E`B?nP+}U)I#c1+FM*1kNvWG|a(TpksZQ3B@sD~b zpQ2)*V*TdwjFOtHvV|;OsiDqHi=6%)o4b!)x$)%9pGTsE z-JL={-Ffv+T87W(Xpooq<`r*VzWQcgBN$$`u}f>-ZQI1BB8ykN*=e4rIsJx9>z}*o zo~|9I;xof literal 0 HcmV?d00001 diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..4d6372eebdb28e45604e46eeda8dd24651419bc0 GIT binary patch literal 1443 zcmb`G{WsKk6vsdJTdFg%tJav9_E4vzrOaqkWF|A724Nly!y+?N9`YV6wZ}5(X(D_N(?!*n3`|_r0Hc?=PQw&*vnU?QTFY zB_MsH|!j$PP;I}?dppoE_gA(4uc!jV&0!l7_;&p2^pxNo>PEcNJv za5_RT$o2Mf!<+r?&EbHH6nMoTsDOa;mN(wv8RNsHpG)`^ymG-S5By8=l9iVXzN_eG%Xg2@Xeq76tTZ*dGh~Lo9vl;Zfs+W#BydUw zCkZ$o1LqWQO$FC9aKlLl*7x9^0q%0}$OMlp@Kk_jHXOjofdePND+j!A{q!8~Jn+s3 z?~~w@4?egS02}8NuulUA=L~QQfm;MzCGd)XhiftT;+zFO&JVyp2mBww?;QByS_1w! zrQlx%{^cMj0|Bo1FjwY@Q8?Hx0cIPF*@-ZRFpPc#bBw{5@tD(5%sClzIfl8WU~V#u zm5Q;_F!wa$BSpqhN>W@2De?TKWR*!ujY;Yylk_X5#~V!L*Gw~;$%4Q8~Mad z@`-kG?yb$a9cHIApZDVZ^U6Xkp<*4rU82O7%}0jjHlK{id@?-wpN*fCHXyXh(bLt* zPc}H-x0e4E&nQ>y%B-(EL=9}RyC%MyX=upHuFhAk&MLbsF0LP-q`XnH78@fT+pKPW zu72MW`|?8ht^tz$iC}ZwLp4tB;Q49K!QCF3@!iB1qOI=?w z7In!}F~ij(18UYUjnbmC!qKhPo%24?8U1x{7o(+?^Zu0Hx81|FuS?bJ0jgBhEMzf< zCgUq7r2OCB(`XkKcN-TL>u5y#dD6D!)5W?`O5)V^>jb)P)GBdy%t$uUMpf$SNV31$ zb||OojAbvMP?T@$h_ZiFLFVHDmbyMhJF|-_)HX3%m=CDI+ID$0^C>kzxprBW)hw(v zr!Gmda);ICoQyhV_oP5+C%?jcG8v+D@9f?Dk*!BxY}dazmrT@64UrP3hlslANK)bq z$67n83eh}OeW&SV@HG95P|bjfqJ7gw$e+`Hxo!4cx`jdK1bJ>YDSpGKLPZ^1cv$ek zIB?0S<#tX?SJCLWdMd{-ME?$hc7A$zBOdIJ)4!KcAwb=VMov)nK;9z>x~rfT1>dS+ zZ6#`2v@`jgbqq)P22H)Tx2CpmM^o1$B+xT6`(v%5xJ(?j#>Q$+rx_R|7TzDZe{J6q zG1*EcU%tE?!kO%^M;3aM6JN*LAKUVb^xz8-Pxo#jR5(-KBeLJvA@-gxNHx0M-ZJLl z;#JwQoh~9V?`UVo#}{6ka@II>++D@%KqGpMdlQ}?9E*wFcf5(#XQnP$Dk5~%iX^>f z%$y;?M0BLp{O3a(-4A?ewryHrrD%cx#Q^%KY1H zNre$ve+vceSLZcNY4U(RBX&)oZn*Py()h)XkE?PL$!bNb{N5FVI2Y%LKEm%yvpyTP z(1P?z~7YxD~Rf<(a@_y` literal 0 HcmV?d00001 diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000..06952be --- /dev/null +++ b/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..cb1ef88 --- /dev/null +++ b/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000..399f698 --- /dev/null +++ b/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/android/build.gradle b/android/build.gradle new file mode 100644 index 0000000..e82eca3 --- /dev/null +++ b/android/build.gradle @@ -0,0 +1,38 @@ +buildscript { + ext.kotlin_version = '1.7.10' + repositories { + google() + mavenLocal() + mavenCentral() + } + + dependencies { + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +allprojects { + repositories { + google() + mavenLocal() + mavenCentral() + maven { url 'https://android-sdk.is.com' } + maven { url 'https://dl-maven-android.mintegral.com/repository/mbridge_android_sdk_oversea' } + maven { url 'https://maven.wortise.com/artifactory/public' } + maven { url 'https://artifact.bytedance.com/repository/pangle' } + maven { url 'https://cboost.jfrog.io/artifactory/chartboost-ads' } + maven { url "https://cboost.jfrog.io/artifactory/chartboost-mediation" } + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(':app') +} + +tasks.register("clean", Delete) { + delete rootProject.buildDir +} diff --git a/android/gradle.properties b/android/gradle.properties new file mode 100644 index 0000000..598d13f --- /dev/null +++ b/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx4G +android.useAndroidX=true +android.enableJetifier=true diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..3c472b9 --- /dev/null +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip diff --git a/android/settings.gradle b/android/settings.gradle new file mode 100644 index 0000000..9ad0f17 --- /dev/null +++ b/android/settings.gradle @@ -0,0 +1,30 @@ +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + } + settings.ext.flutterSdkPath = flutterSdkPath() + + includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") + + repositories { + google() + mavenLocal() + mavenCentral() + gradlePluginPortal() + } + + plugins { + id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false + } +} + +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "7.3.0" apply false +} + +include ":app" diff --git a/integration_test/plugin_integration_test.dart b/integration_test/plugin_integration_test.dart new file mode 100644 index 0000000..8967a9b --- /dev/null +++ b/integration_test/plugin_integration_test.dart @@ -0,0 +1,24 @@ +// This is a basic Flutter integration test. +// +// Since integration tests run in a full Flutter application, they can interact +// with the host side of a plugin implementation, unlike Dart unit tests. +// +// For more information about Flutter integration tests, please see +// https://docs.flutter.dev/cookbook/testing/integration/introduction + + +import 'package:flutter_test/flutter_test.dart'; +import 'package:integration_test/integration_test.dart'; + +import 'package:tapsell_mediation/tapsell.dart'; + +void main() { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + + testWidgets('requestRewardedAd test', (WidgetTester tester) async { + final String? adId = await Tapsell.requestRewardedAd("zoneId"); + // The adId string depends on the host platform running the test, so + // just assert that some non-empty string is returned. + expect(adId?.isNotEmpty, true); + }); +} diff --git a/lib/ad/tapsell_mediation_keys.dart b/lib/ad/tapsell_mediation_keys.dart new file mode 100644 index 0000000..1970bc6 --- /dev/null +++ b/lib/ad/tapsell_mediation_keys.dart @@ -0,0 +1,65 @@ +class TapsellMediationKeys { + static const String rewarded = "1d710cc7-5e96-46ac-a3e9-8463300333e6"; + static const String interstitial = "b3972749-f62a-475a-9ff2-cfc9e2a40f87"; + static const String native = "d217e3e6-0070-4120-925d-5d39d0298893"; + static const String banner = "e3d5999c-5990-4e31-8ce9-642ce040a7f4"; +} + +class LegacyKeys { + static const String rewarded = "63b92f04-3d0f-4805-84a4-abeccf4edc18"; + static const String interstitial = "0c4e2849-feea-4688-8280-0b0ae2ee0728"; + static const String native = "b1b92bca-8a54-4b82-9f53-90ea2b1a912c"; + static const String banner = "4bf4e11d-0967-41e6-91f6-a128d9462f2a"; +} + +class AdmobKeys { + static const String rewarded = "d8f4ff72-e2e9-4e67-9eb8-f6d75787ef09"; + static const String interstitial = "48b73764-8025-4c9d-9507-ce7a2c7f32ef"; + static const String native = "15cacb1b-6598-4fe9-b2da-8b26b4c1bbc5"; + static const String banner = "f965455e-a37a-4732-a0b4-05fc39cae16e"; +} + +class FyberKeys { + static const String rewarded = "42bd8edf-bdc9-4da5-ae6d-d465366b29f4"; + static const String interstitial = "ec274046-5cc7-40e0-973b-405084682967"; + static const String banner = "10365955-147e-4fbc-9a08-15a930797902"; +} + +class ApplovinKeys { + static const String rewarded = "1abf9ca9-4f93-4ead-a238-b2d0d3032a7a"; + static const String interstitial = "8c33dc60-5911-4145-90b0-d8cce9594fed"; + static const String native = "2db08af5-54e3-458e-9399-1d365a7516c9"; + static const String banner = "1df4bf1e-4fef-4704-b776-7881bdad5303"; +} + +class MintegralKeys { + static const String rewarded = "b4c24eba-b715-47aa-8e6e-641d19936765"; + static const String interstitial = "b2ef073b-f9a1-4555-8450-ce30cf3cee98"; + static const String native = "1a744a71-5abe-4d4a-8323-3832c89495eb"; + static const String banner = "6c0b2878-c743-4668-b224-00b07ed66550"; +} + +class IronSourceKeys { + static const String rewarded = "59ea106a-10c2-4711-9b50-38c73200f56a"; + static const String interstitial = "e87e094b-1e51-468c-ba0c-b2752dc04d72"; + static const String banner = "33063aae-07c0-4571-aeac-842c0c7f6478"; +} + +class LiftoffKeys { + static const String rewarded = "0f447ea1-6b11-4e39-b942-712e2d696d78"; + static const String interstitial = "2316460a-fbcc-4e29-8a8e-f10ef5358b3b"; + static const String banner = "c066375e-da10-45a8-be3b-6edf5668a0e4"; +} + +class ChartBoostKeys { + static const String rewarded = "3dde311c-daf5-4a6b-8ce7-08a4103cfb7f"; + static const String interstitial = "0d3e6f6d-8a11-4c32-a076-4415c03132a9"; + static const String banner = "0d3e6f6d-8a11-4c32-a076-4415c03132a9"; +} + +class WortiseKeys { + static const String rewarded = "4fcf71a4-afd1-412d-9b19-46dd85644f9d"; + static const String interstitial = "4d268df4-7e8a-43d8-a014-02b4aeff1e72"; + static const String native = "88eab80b-113b-4856-8dc2-4aa571c4d7c3"; + static const String banner = "ddd6c321-1f1f-4396-8524-a4f760063b2f"; +} \ No newline at end of file diff --git a/lib/main.dart b/lib/main.dart new file mode 100644 index 0000000..a8ee406 --- /dev/null +++ b/lib/main.dart @@ -0,0 +1,76 @@ +import 'dart:async'; + +import 'package:flutter/material.dart' hide Banner; +import 'package:flutter_tapsell_mediation_example/navigation/routes.dart'; +import 'package:flutter_tapsell_mediation_example/screens/banner.dart'; +import 'package:flutter_tapsell_mediation_example/screens/home.dart'; +import 'package:flutter_tapsell_mediation_example/screens/interstitial.dart'; +import 'package:flutter_tapsell_mediation_example/screens/rewarded.dart'; +import 'package:get/get.dart'; +import 'package:tapsell_mediation/tapsell.dart'; + +void main() { + WidgetsFlutterBinding.ensureInitialized(); + runApp(const MyApp()); +} + +class MyApp extends StatefulWidget { + const MyApp({super.key}); + + @override + State createState() => _MyAppState(); +} + +class _MyAppState extends State { + String _log = ''; + + @override + void initState() { + super.initState(); + setUserConsent(true); + } + + void addLog(String message) { + // If the widget was removed from the tree while the asynchronous platform + // message was in flight, we want to discard the reply rather than calling + // setState to update our non-existent appearance. + if (!mounted) return; + setState(() { + _log = '$message\n$_log'; + }); + } + + Future setUserConsent(bool consent) async { + Tapsell.setUserConsent(consent); + } + + @override + Widget build(BuildContext context) { + return GetMaterialApp( + home: const Home(), + theme: ThemeData( + primaryColor: Colors.deepOrange, + colorScheme: + ColorScheme.fromSwatch().copyWith(secondary: Colors.deepOrange), + ), + getPages: [ + GetPage( + name: NavRoutes.home, + page: () => const Home(), + transition: Transition.fadeIn), + GetPage( + name: NavRoutes.rewarded, + page: () => const Rewarded(), + transition: Transition.leftToRight), + GetPage( + name: NavRoutes.interstitial, + page: () => const Interstitial(), + transition: Transition.leftToRightWithFade), + GetPage( + name: NavRoutes.banner, + page: () => const Banner(), + transition: Transition.leftToRight) + ] + ); + } +} diff --git a/lib/navigation/routes.dart b/lib/navigation/routes.dart new file mode 100644 index 0000000..12b4c47 --- /dev/null +++ b/lib/navigation/routes.dart @@ -0,0 +1,7 @@ +class NavRoutes { + static const String home = "/"; + static const String rewarded = "/rewarded"; + static const String interstitial = "/interstitial"; + static const String native = "/native"; + static const String banner = "/banner"; +} \ No newline at end of file diff --git a/lib/screens/banner.dart b/lib/screens/banner.dart new file mode 100644 index 0000000..3195f50 --- /dev/null +++ b/lib/screens/banner.dart @@ -0,0 +1,76 @@ +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_tapsell_mediation_example/ad/tapsell_mediation_keys.dart'; +import 'package:tapsell_mediation/tapsell.dart'; + +class Banner extends StatefulWidget { + const Banner({super.key}); + + @override + State createState() => _BannerState(); +} + +class _BannerState extends State { + String _log = ''; + String _adId = ''; + + void addLog(String message) { + // If the widget was removed from the tree while the asynchronous platform + // message was in flight, we want to discard the reply rather than calling + // setState to update our non-existent appearance. + if (!mounted) return; + setState(() { + _log = '$message\n$_log'; + }); + } + + Future requestBannerAd() async { + try { + _adId = await Tapsell.requestBannerAd(LegacyKeys.banner, + bannerSize: BannerSize.banner_320_90) ?? + 'Unknown ad id'; + } on PlatformException catch (e) { + _adId = 'Failed to request ad. Error: ${e.message}'; + } + addLog(_adId); + } + + Future showBannerAd() async { + Tapsell.showBannerAd(_adId, bannerPosition: BannerPosition.bottom, + onAdImpression: () { + addLog('onAdImpression'); + }, onAdClicked: () { + addLog('onAdClicked'); + }, onAdClosed: (ShowCompletionState completionState) { + addLog('onAdClosed: $completionState'); + }, onAdFailed: (String message) { + addLog('onAdFailed: $message'); + }); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const Text('Banner Ad'), + ), + body: Center( + child: Column( + children: [ + ElevatedButton( + onPressed: requestBannerAd, + child: const Text('Request Ad'), + ), + ElevatedButton( + onPressed: showBannerAd, + child: const Text('Show Ad'), + ), + Text(_log), + ], + ), + ), + ); + } +} diff --git a/lib/screens/home.dart b/lib/screens/home.dart new file mode 100644 index 0000000..fc692b3 --- /dev/null +++ b/lib/screens/home.dart @@ -0,0 +1,42 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_tapsell_mediation_example/navigation/routes.dart'; +import 'package:get/get.dart'; + +class Home extends StatelessWidget { + const Home({super.key}); + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const Text("Tapsell Mediation Flutter Sample"), + titleTextStyle: const TextStyle( + color: Colors.black, fontSize: 18, fontWeight: FontWeight.w500), + centerTitle: true, + ), + body: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + ElevatedButton( + child: const Text("Rewarded"), + onPressed: () => {Get.toNamed(NavRoutes.rewarded)}, + ), + ElevatedButton( + child: const Text("Interstitial"), + onPressed: () { + Get.toNamed(NavRoutes.interstitial); + }, + ), + ElevatedButton( + child: const Text("Banner"), + onPressed: () { + Get.toNamed(NavRoutes.banner); + }, + ) + ], + ), + ), + ); + } +} diff --git a/lib/screens/interstitial.dart b/lib/screens/interstitial.dart new file mode 100644 index 0000000..223e557 --- /dev/null +++ b/lib/screens/interstitial.dart @@ -0,0 +1,74 @@ +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_tapsell_mediation_example/ad/tapsell_mediation_keys.dart'; +import 'package:tapsell_mediation/tapsell.dart'; + +class Interstitial extends StatefulWidget { + const Interstitial({super.key}); + + @override + State createState() => _InterstitialState(); +} + +class _InterstitialState extends State { + String _log = ''; + String _adId = ''; + + void addLog(String message) { + // If the widget was removed from the tree while the asynchronous platform + // message was in flight, we want to discard the reply rather than calling + // setState to update our non-existent appearance. + if (!mounted) return; + setState(() { + _log = '$message\n$_log'; + }); + } + + Future requestInterstitialAd() async { + try { + _adId = await Tapsell.requestInterstitialAd(LegacyKeys.interstitial) ?? + 'Unknown ad id'; + } on PlatformException catch (e) { + _adId = 'Failed to request ad. Error: ${e.message}'; + } + addLog(_adId); + } + + Future showInterstitialAd() async { + Tapsell.showInterstitialAd(_adId, onAdImpression: () { + addLog('onAdImpression'); + }, onAdClicked: () { + addLog('onAdClicked'); + }, onAdClosed: (ShowCompletionState completionState) { + addLog('onAdClosed: $completionState'); + }, onAdFailed: (String message) { + addLog('onAdFailed: $message'); + }); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const Text('Interstitial Ad'), + ), + body: Center( + child: Column( + children: [ + ElevatedButton( + onPressed: requestInterstitialAd, + child: const Text('Request Ad'), + ), + ElevatedButton( + onPressed: showInterstitialAd, + child: const Text('Show Ad'), + ), + Text(_log), + ], + ), + ), + ); + } +} diff --git a/lib/screens/rewarded.dart b/lib/screens/rewarded.dart new file mode 100644 index 0000000..5da2a10 --- /dev/null +++ b/lib/screens/rewarded.dart @@ -0,0 +1,77 @@ +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_tapsell_mediation_example/ad/tapsell_mediation_keys.dart'; +import 'package:tapsell_mediation/tapsell.dart'; + +class Rewarded extends StatefulWidget { + const Rewarded({super.key}); + + @override + State createState() => _RewardedState(); +} + +class _RewardedState extends State { + String _log = ''; + String _adId = ''; + + void addLog(String message) { + // If the widget was removed from the tree while the asynchronous platform + // message was in flight, we want to discard the reply rather than calling + // setState to update our non-existent appearance. + if (!mounted) return; + setState(() { + _log = '$message\n$_log'; + }); + } + + Future requestRewardedAd() async { + try { + _adId = await Tapsell.requestRewardedAd(LegacyKeys.rewarded) ?? + 'Unknown ad id'; + } on PlatformException catch (e) { + _adId = 'Failed to request ad. Error: ${e.message}'; + } + + addLog(_adId); + } + + Future showRewardedAd() async { + Tapsell.showRewardedAd(_adId, onAdImpression: () { + addLog('onAdImpression'); + }, onAdClicked: () { + addLog('onAdClicked'); + }, onAdRewarded: () { + addLog('onAdRewarded'); + }, onAdClosed: (ShowCompletionState completionState) { + addLog('onAdClosed: $completionState'); + }, onAdFailed: (String message) { + addLog('onAdFailed: $message'); + }); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const Text('Rewarded Ad'), + ), + body: Center( + child: Column( + children: [ + ElevatedButton( + onPressed: requestRewardedAd, + child: const Text('Request Ad'), + ), + ElevatedButton( + onPressed: showRewardedAd, + child: const Text('Show Ad'), + ), + Text(_log), + ], + ), + ), + ); + } +} diff --git a/pubspec.lock b/pubspec.lock new file mode 100644 index 0000000..41f2f9d --- /dev/null +++ b/pubspec.lock @@ -0,0 +1,681 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" + url: "https://pub.dev" + source: hosted + version: "67.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" + url: "https://pub.dev" + source: hosted + version: "6.4.1" + args: + dependency: transitive + description: + name: args + sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 + url: "https://pub.dev" + source: hosted + version: "2.4.2" + async: + dependency: transitive + description: + name: async + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" + source: hosted + version: "2.11.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + build: + dependency: transitive + description: + name: build + sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + build_config: + dependency: transitive + description: + name: build_config + sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 + url: "https://pub.dev" + source: hosted + version: "1.1.1" + build_daemon: + dependency: transitive + description: + name: build_daemon + sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" + url: "https://pub.dev" + source: hosted + version: "4.0.1" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" + url: "https://pub.dev" + source: hosted + version: "2.4.2" + build_runner: + dependency: "direct dev" + description: + name: build_runner + sha256: "581bacf68f89ec8792f5e5a0b2c4decd1c948e97ce659dc783688c8a88fbec21" + url: "https://pub.dev" + source: hosted + version: "2.4.8" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + sha256: "4ae8ffe5ac758da294ecf1802f2aff01558d8b1b00616aa7538ea9a8a5d50799" + url: "https://pub.dev" + source: hosted + version: "7.3.0" + built_collection: + dependency: transitive + description: + name: built_collection + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" + source: hosted + version: "5.1.1" + built_value: + dependency: transitive + description: + name: built_value + sha256: fedde275e0a6b798c3296963c5cd224e3e1b55d0e478d5b7e65e6b540f363a0e + url: "https://pub.dev" + source: hosted + version: "8.9.1" + characters: + dependency: transitive + description: + name: characters + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + checked_yaml: + dependency: transitive + description: + name: checked_yaml + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff + url: "https://pub.dev" + source: hosted + version: "2.0.3" + clock: + dependency: transitive + description: + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" + source: hosted + version: "1.1.1" + code_builder: + dependency: transitive + description: + name: code_builder + sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 + url: "https://pub.dev" + source: hosted + version: "4.10.0" + collection: + dependency: transitive + description: + name: collection + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" + source: hosted + version: "1.18.0" + convert: + dependency: transitive + description: + name: convert + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + url: "https://pub.dev" + source: hosted + version: "3.1.1" + crypto: + dependency: transitive + description: + name: crypto + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + url: "https://pub.dev" + source: hosted + version: "3.0.3" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d + url: "https://pub.dev" + source: hosted + version: "1.0.6" + dart_style: + dependency: transitive + description: + name: dart_style + sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9" + url: "https://pub.dev" + source: hosted + version: "2.3.6" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + file: + dependency: transitive + description: + name: file + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + url: "https://pub.dev" + source: hosted + version: "7.0.0" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_driver: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 + url: "https://pub.dev" + source: hosted + version: "2.0.3" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + url: "https://pub.dev" + source: hosted + version: "3.2.0" + fuchsia_remote_debug_protocol: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + get: + dependency: "direct main" + description: + name: get + sha256: e4e7335ede17452b391ed3b2ede016545706c01a02292a6c97619705e7d2a85e + url: "https://pub.dev" + source: hosted + version: "4.6.6" + glob: + dependency: transitive + description: + name: glob + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + graphs: + dependency: transitive + description: + name: graphs + sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 + url: "https://pub.dev" + source: hosted + version: "2.3.1" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + url: "https://pub.dev" + source: hosted + version: "3.2.1" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + integration_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + io: + dependency: transitive + description: + name: io + sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + js: + dependency: transitive + description: + name: js + sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf + url: "https://pub.dev" + source: hosted + version: "0.7.1" + json_annotation: + dependency: transitive + description: + name: json_annotation + sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 + url: "https://pub.dev" + source: hosted + version: "4.8.1" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + url: "https://pub.dev" + source: hosted + version: "10.0.0" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + lints: + dependency: transitive + description: + name: lints + sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + logging: + dependency: transitive + description: + name: logging + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + matcher: + dependency: transitive + description: + name: matcher + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" + source: hosted + version: "0.12.16+1" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + url: "https://pub.dev" + source: hosted + version: "0.8.0" + meta: + dependency: transitive + description: + name: meta + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + url: "https://pub.dev" + source: hosted + version: "1.11.0" + mime: + dependency: transitive + description: + name: mime + sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" + url: "https://pub.dev" + source: hosted + version: "1.0.5" + package_config: + dependency: transitive + description: + name: package_config + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + path: + dependency: transitive + description: + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" + source: hosted + version: "1.9.0" + platform: + dependency: transitive + description: + name: platform + sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" + url: "https://pub.dev" + source: hosted + version: "3.1.4" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + pool: + dependency: transitive + description: + name: pool + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" + source: hosted + version: "1.5.1" + process: + dependency: transitive + description: + name: process + sha256: "21e54fd2faf1b5bdd5102afd25012184a6793927648ea81eea80552ac9405b32" + url: "https://pub.dev" + source: hosted + version: "5.0.2" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367 + url: "https://pub.dev" + source: hosted + version: "1.2.3" + shelf: + dependency: transitive + description: + name: shelf + sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + url: "https://pub.dev" + source: hosted + version: "1.4.1" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_span: + dependency: transitive + description: + name: source_span + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" + source: hosted + version: "1.11.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" + source: hosted + version: "2.1.2" + stream_transform: + dependency: transitive + description: + name: stream_transform + sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + sync_http: + dependency: transitive + description: + name: sync_http + sha256: "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961" + url: "https://pub.dev" + source: hosted + version: "0.3.1" + tapsell_mediation: + dependency: "direct main" + description: + path: "../packages/tapsell" + relative: true + source: path + version: "1.0.1-beta06" + tapsell_mediation_admob: + dependency: "direct main" + description: + path: "../packages/admob" + relative: true + source: path + version: "1.0.1-beta06" + tapsell_mediation_applovin: + dependency: "direct main" + description: + path: "../packages/applovin" + relative: true + source: path + version: "1.0.1-beta06" + tapsell_mediation_chartboost: + dependency: "direct main" + description: + path: "../packages/chartboost" + relative: true + source: path + version: "1.0.1-beta06" + tapsell_mediation_fyber: + dependency: "direct main" + description: + path: "../packages/fyber" + relative: true + source: path + version: "1.0.1-beta06" + tapsell_mediation_ironsource: + dependency: "direct main" + description: + path: "../packages/ironsource" + relative: true + source: path + version: "1.0.1-beta06" + tapsell_mediation_legacy: + dependency: "direct main" + description: + path: "../packages/legacy" + relative: true + source: path + version: "1.0.1-beta06" + tapsell_mediation_liftoff: + dependency: "direct main" + description: + path: "../packages/liftoff" + relative: true + source: path + version: "1.0.1-beta06" + tapsell_mediation_mintegral: + dependency: "direct main" + description: + path: "../packages/mintegral" + relative: true + source: path + version: "1.0.1-beta06" + tapsell_mediation_unityads: + dependency: "direct main" + description: + path: "../packages/unityads" + relative: true + source: path + version: "1.0.1-beta06" + tapsell_mediation_wortise: + dependency: "direct main" + description: + path: "../packages/wortise" + relative: true + source: path + version: "1.0.1-beta06" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test_api: + dependency: transitive + description: + name: test_api + sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + url: "https://pub.dev" + source: hosted + version: "0.6.1" + timing: + dependency: transitive + description: + name: timing + sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" + source: hosted + version: "1.3.2" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + url: "https://pub.dev" + source: hosted + version: "13.0.0" + watcher: + dependency: transitive + description: + name: watcher + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + web: + dependency: transitive + description: + name: web + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + url: "https://pub.dev" + source: hosted + version: "0.5.1" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + sha256: "1d8e795e2a8b3730c41b8a98a2dff2e0fb57ae6f0764a1c46ec5915387d257b2" + url: "https://pub.dev" + source: hosted + version: "2.4.4" + webdriver: + dependency: transitive + description: + name: webdriver + sha256: "003d7da9519e1e5f329422b36c4dcdf18d7d2978d1ba099ea4e45ba490ed845e" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + yaml: + dependency: transitive + description: + name: yaml + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + url: "https://pub.dev" + source: hosted + version: "3.1.2" +sdks: + dart: ">=3.3.0 <4.0.0" + flutter: ">=3.13.0" diff --git a/pubspec.yaml b/pubspec.yaml new file mode 100644 index 0000000..43cf488 --- /dev/null +++ b/pubspec.yaml @@ -0,0 +1,103 @@ +name: flutter_tapsell_mediation_example +version: 1.0.1-beta06 +description: "Demonstrates how to use the flutter_tapsell_mediation plugin." +# The following line prevents the package from being accidentally published to +# pub.dev using `flutter pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +environment: + sdk: '>=3.2.6 <4.0.0' + +# Dependencies specify other packages that your package needs in order to work. +# To automatically upgrade your package dependencies to the latest versions +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +dependencies: + flutter: + sdk: flutter + get: ^4.6.6 + + tapsell_mediation: + path: ../packages/tapsell + tapsell_mediation_legacy: + path: ../packages/legacy + tapsell_mediation_admob: + path: ../packages/admob + tapsell_mediation_applovin: + path: ../packages/applovin + tapsell_mediation_mintegral: + path: ../packages/mintegral + tapsell_mediation_ironsource: + path: ../packages/ironsource + tapsell_mediation_liftoff: + path: ../packages/liftoff + tapsell_mediation_fyber: + path: ../packages/fyber + tapsell_mediation_unityads: + path: ../packages/unityads + tapsell_mediation_wortise: + path: ../packages/wortise + tapsell_mediation_chartboost: + path: ../packages/chartboost + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.2 + +dev_dependencies: + integration_test: + sdk: flutter + flutter_test: + sdk: flutter + build_runner: ^2.0.0 + + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. + flutter_lints: ^2.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/assets-and-images/#from-packages + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/custom-fonts/#from-packages diff --git a/test/widget_test.dart b/test/widget_test.dart new file mode 100644 index 0000000..d930845 --- /dev/null +++ b/test/widget_test.dart @@ -0,0 +1,27 @@ +// This is a basic Flutter widget test. +// +// To perform an interaction with a widget in your test, use the WidgetTester +// utility in the flutter_test package. For example, you can send tap and scroll +// gestures. You can also use WidgetTester to find child widgets in the widget +// tree, read text, and verify that the values of widget properties are correct. + +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'package:flutter_tapsell_mediation_example/main.dart'; + +void main() { + testWidgets('Verify Platform version', (WidgetTester tester) async { + // Build our app and trigger a frame. + await tester.pumpWidget(const MyApp()); + + // Verify that platform version is retrieved. + expect( + find.byWidgetPredicate( + (Widget widget) => widget is Text && + widget.data!.startsWith('Running on:'), + ), + findsOneWidget, + ); + }); +}