Skip to content

Commit

Permalink
Merge pull request #1 from AppsFlyerSDK/dev/RD-83720/deprecate_mopub
Browse files Browse the repository at this point in the history
update to 6.5.4
  • Loading branch information
af-margot authored Apr 18, 2022
2 parents adffa2a + 1caa66e commit bdb8621
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 35 deletions.
41 changes: 19 additions & 22 deletions Assets/AppsFlyer/AppsFlyerAdRevenue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace AppsFlyerSDK
public class AppsFlyerAdRevenue : MonoBehaviour
{

public static readonly string kAppsFlyerAdRevenueVersion = "6.5.3";
public static readonly string kAppsFlyerAdRevenueVersion = "6.5.4";

#if UNITY_ANDROID && !UNITY_EDITOR
private static AndroidJavaClass appsFlyerAndroid = new AndroidJavaClass("com.appsflyer.unity.afunityadrevenuegenericplugin.AdRevenueUnityWrapper");
Expand Down Expand Up @@ -110,24 +110,22 @@ private static int setMediationNetworkTypeAndroid(AppsFlyerAdRevenueMediationNet
return 1;
case AppsFlyerAdRevenueMediationNetworkType.AppsFlyerAdRevenueMediationNetworkTypeGoogleAdMob:
return 2;
case AppsFlyerAdRevenueMediationNetworkType.AppsFlyerAdRevenueMediationNetworkTypeMoPub:
return 3;
case AppsFlyerAdRevenueMediationNetworkType.AppsFlyerAdRevenueMediationNetworkTypeFyber:
return 4;
return 3;
case AppsFlyerAdRevenueMediationNetworkType.AppsFlyerAdRevenueMediationNetworkTypeAppodeal:
return 5;
return 4;
case AppsFlyerAdRevenueMediationNetworkType.AppsFlyerAdRevenueMediationNetworkTypeAdmost:
return 6;
return 5;
case AppsFlyerAdRevenueMediationNetworkType.AppsFlyerAdRevenueMediationNetworkTypeTopon:
return 7;
return 6;
case AppsFlyerAdRevenueMediationNetworkType.AppsFlyerAdRevenueMediationNetworkTypeTradplus:
return 8;
return 7;
case AppsFlyerAdRevenueMediationNetworkType.AppsFlyerAdRevenueMediationNetworkTypeYandex:
return 9;
return 8;
case AppsFlyerAdRevenueMediationNetworkType.AppsFlyerAdRevenueMediationNetworkTypeChartBoost:
return 10;
return 9;
case AppsFlyerAdRevenueMediationNetworkType.AppsFlyerAdRevenueMediationNetworkTypeUnity:
return 11;
return 10;
default:
return -1;
}
Expand Down Expand Up @@ -157,17 +155,16 @@ private static AndroidJavaObject convertDictionaryToJavaMap(Dictionary<string, s
public enum AppsFlyerAdRevenueMediationNetworkType
{
AppsFlyerAdRevenueMediationNetworkTypeGoogleAdMob = 1,
AppsFlyerAdRevenueMediationNetworkTypeMoPub = 2,
AppsFlyerAdRevenueMediationNetworkTypeIronSource = 3,
AppsFlyerAdRevenueMediationNetworkTypeApplovinMax = 4,
AppsFlyerAdRevenueMediationNetworkTypeFyber = 5,
AppsFlyerAdRevenueMediationNetworkTypeAppodeal = 6,
AppsFlyerAdRevenueMediationNetworkTypeAdmost = 7,
AppsFlyerAdRevenueMediationNetworkTypeTopon = 8,
AppsFlyerAdRevenueMediationNetworkTypeTradplus = 9,
AppsFlyerAdRevenueMediationNetworkTypeYandex = 10,
AppsFlyerAdRevenueMediationNetworkTypeChartBoost = 11,
AppsFlyerAdRevenueMediationNetworkTypeUnity = 12
AppsFlyerAdRevenueMediationNetworkTypeIronSource = 2,
AppsFlyerAdRevenueMediationNetworkTypeApplovinMax = 3,
AppsFlyerAdRevenueMediationNetworkTypeFyber = 4,
AppsFlyerAdRevenueMediationNetworkTypeAppodeal = 5,
AppsFlyerAdRevenueMediationNetworkTypeAdmost = 6,
AppsFlyerAdRevenueMediationNetworkTypeTopon = 7,
AppsFlyerAdRevenueMediationNetworkTypeTradplus = 8,
AppsFlyerAdRevenueMediationNetworkTypeYandex = 9,
AppsFlyerAdRevenueMediationNetworkTypeChartBoost = 10,
AppsFlyerAdRevenueMediationNetworkTypeUnity = 11

}

Expand Down
7 changes: 3 additions & 4 deletions Assets/AppsFlyer/Editor/AppsFlyerAdRevenueDependencies.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<dependencies>
<androidPackages>
<androidPackage spec="com.appsflyer:adrevenue:6.5.3"></androidPackage>
<androidPackage spec="com.appsflyer:unity-adrevenue-generic-wrapper:6.5.33"></androidPackage>
<androidPackage spec="com.mopub:mopub-sdk:5.18.0"></androidPackage>
<androidPackage spec="com.appsflyer:adrevenue:6.5.4"></androidPackage>
<androidPackage spec="com.appsflyer:unity-adrevenue-generic-wrapper:6.5.4"></androidPackage>
</androidPackages>

<iosPods>
<iosPod name="AppsFlyer-AdRevenue" version="6.5.3" minTargetSdk="10.0">
<iosPod name="AppsFlyer-AdRevenue" version="6.5.4" minTargetSdk="10.0">
</iosPod>
</iosPods>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ android {
repositories { maven { url "https://s3.amazonaws.com/moat-sdk-builds" } }

dependencies {
compileOnly 'com.appsflyer:adrevenue:6.5.3'
compileOnly 'com.mopub:mopub-sdk:5.18.0'
compileOnly 'com.appsflyer:adrevenue:6.5.4'
}

apply from: file('publish.gradle')
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,23 @@
public class AdRevenueUnityWrapper {

/**
* Start - currently we only support MoPub
* In the future we will support more AppsFlyerAdRevenueWrapperTypes
*
* start
* @param application
*/
public static void start(Application application) {
AppsFlyerAdRevenue.initialize(new AppsFlyerAdRevenue.Builder(application)
.build());
}

/**
* logAdRevenue
*
* @param monetizationNetwork
* @param mediationNetwork
* @param eventRevenueCurrency
* @param eventRevenue
* @param nonMandatory
*/
public static void logAdRevenue(String monetizationNetwork,
int mediationNetwork,
String eventRevenueCurrency,
Expand Down
4 changes: 2 additions & 2 deletions af-unity-adrevenue-generic-android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ android.enableJetifier=true

GROUP=com.appsflyer

VERSION_CODE=4
VERSION_NAME=6.5.33
VERSION_CODE=5
VERSION_NAME=6.5.4

POM_ARTIFACT_ID=unity-adrevenue-generic-wrapper
POM_PACKAGING=aar
Expand Down
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions deploy/build_appsflyer_unity_adrevenue_plugin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ echo "Start Build for appsflyer-unity-adrevenue-generic-connector.unitypackage"

DEPLOY_PATH=outputs
UNITY_PATH="/Applications/Unity/Unity.app/Contents/MacOS/Unity"
PACKAGE_NAME="appsflyer-unity-adrevenue-generic-connector-6.5.3.unitypackage"
PACKAGE_NAME="appsflyer-unity-adrevenue-generic-connector-6.5.4.unitypackage"
mkdir -p $DEPLOY_PATH


Expand All @@ -20,7 +20,7 @@ mkdir -p $DEPLOY_PATH
Assets \
$PWD/$DEPLOY_PATH/$PACKAGE_NAME \
-quit \
&& echo "package exported successfully to outputs/appsflyer-unity-adrevenue-generic-connector-6.5.3.unitypackage" \
&& echo "package exported successfully to outputs/appsflyer-unity-adrevenue-generic-connector-6.5.4.unitypackage" \
|| echo "Failed to export package. See create_unity_core.log for more info."


Expand Down

0 comments on commit bdb8621

Please sign in to comment.