Skip to content

Commit

Permalink
chore: update plugin to 1.0.1-beta07
Browse files Browse the repository at this point in the history
  • Loading branch information
MortezaNedaei committed Aug 10, 2024
1 parent a4986d5 commit e3466a0
Show file tree
Hide file tree
Showing 22 changed files with 142 additions and 209 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ crashlytics-build.properties
test_BurstDebugInformation_DoNotShip/
test_BackUpThisFolder_ButDontShipItWithYourGame/
test_mapping.txt
TapsellMediation-UnitySample_BurstDebugInformation_DoNotShip

ProjectSettings/boot.config

/[Aa]ndroid/
Android_BurstDebugInformation_DoNotShip
Expand Down
15 changes: 15 additions & 0 deletions Assets/Plugins/Android/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.unity3d.player" xmlns:tools="http://schemas.android.com/tools">
<application>
<activity android:name="com.unity3d.player.UnityPlayerActivity" android:theme="@style/UnityThemeSelector">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
</activity>
<meta-data android:name="ir.tapsell.mediation.APPLICATION_KEY" android:value="a12e38ed-f1fc-4c76-b638-55f06c103066" />
<meta-data android:name="applovin.sdk.key" android:value="5WfZLCGTQmDr6Mf7BBEf5blVwrf8VBMJSmwUSq9-1q5bPpCH_OGAWEP2z2lRkmonLgPzG6gbL4DlvUF9frFmt6" />
<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-6201798499291567~9611758993" />
</application>
</manifest>

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

6 changes: 4 additions & 2 deletions Assets/Plugins/Android/gradleTemplate.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ org.gradle.jvmargs=-Xmx**JVM_HEAP_SIZE**M
org.gradle.parallel=true
unityStreamingAssets=**STREAMING_ASSETS**
# Android Resolver Properties Start
#android.useAndroidX=true
#android.enableJetifier=true
android.useAndroidX=true
android.enableJetifier=true
# Android Resolver Properties End
**ADDITIONAL_PROPERTIES**

android.enableR8=**MINIFY_WITH_R_EIGHT**
24 changes: 20 additions & 4 deletions Assets/Plugins/Android/mainTemplate.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
// Android Resolver Repos Start
([rootProject] + (rootProject.subprojects as List)).each { project ->
project.repositories {
def unityProjectPath = $/file:///**DIR_UNITYPROJECT**/$.replace("\\", "/")
maven {
url "https://maven.google.com"
}
maven {
url "https://android-sdk.is.com" // Assets/Tapsell/Mediation/Adapter/IronSource/Editor/IronSourceAdapterDependencies.xml:6, Assets/Tapsell/Mediation/Adapter/Admob/Editor/AdmobAdapterDependencies.xml:7, Assets/Tapsell/Mediation/Adapter/Applovin/Editor/ApplovinAdapterDependencies.xml:7, Assets/Tapsell/Mediation/Adapter/Mintegral/Editor/MintegralAdapterDependencies.xml:8
}
maven {
url "https://dl-maven-android.mintegral.com/repository/mbridge_android_sdk_oversea" // Assets/Tapsell/Mediation/Adapter/Mintegral/Editor/MintegralAdapterDependencies.xml:8
}
mavenLocal()
mavenCentral()
}
}
// Android Resolver Repos End
apply plugin: 'com.android.library'
**APPLY_PLUGINS**

Expand All @@ -7,7 +25,6 @@ dependencies {
implementation 'com.google.code.gson:gson:2.8.5' // Assets/GoogleMobileAdsNative/Editor/GoogleMobileAdsNativeDependencies.xml:3
implementation 'ir.tapsell.mediation.adapter:admob-unity:1.0.1-beta07' // Assets/Tapsell/Mediation/Adapter/Admob/Editor/AdmobAdapterDependencies.xml:7
implementation 'ir.tapsell.mediation.adapter:applovin-unity:1.0.1-beta07' // Assets/Tapsell/Mediation/Adapter/Applovin/Editor/ApplovinAdapterDependencies.xml:7
implementation 'ir.tapsell.mediation.adapter:fyber-unity:1.0.1-beta07' // Assets/Tapsell/Mediation/Adapter/Fyber/Editor/FyberAdapterDependencies.xml:7
implementation 'ir.tapsell.mediation.adapter:ironsource-unity:1.0.1-beta07' // Assets/Tapsell/Mediation/Adapter/IronSource/Editor/IronSourceAdapterDependencies.xml:3
implementation 'ir.tapsell.mediation.adapter:legacy-unity:1.0.1-beta07' // Assets/Tapsell/Mediation/Adapter/Legacy/Editor/LegacyAdapterDependencies.xml:3
implementation 'ir.tapsell.mediation.adapter:mintegral-unity:1.0.1-beta07' // Assets/Tapsell/Mediation/Adapter/Mintegral/Editor/MintegralAdapterDependencies.xml:8
Expand All @@ -19,7 +36,6 @@ dependencies {
android {
packagingOptions {
exclude ('/lib/armeabi/*' + '*')
exclude ('/lib/armeabi-v7a/*' + '*')
exclude ('/lib/mips/*' + '*')
exclude ('/lib/mips64/*' + '*')
exclude ('/lib/x86/*' + '*')
Expand All @@ -35,8 +51,8 @@ android {
buildToolsVersion '**BUILDTOOLS**'

compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

defaultConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,6 @@ private protected override string PluginName()
return "TapsellMediationAdmobAdapter";
}

private protected override string ManifestRelativePath()
{
#if UNITY_2021_2_OR_NEWER
return "Plugins/Android/TapsellMediationAdmobAdapterPlugin/AndroidManifest.xml";
#else
return "Plugins/Android/AndroidManifest.xml";
#endif
}

private protected override string MetadataApplicationKey()
{
return "com.google.android.gms.ads.APPLICATION_ID";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,6 @@ private protected override string PluginName()
return "TapsellMediationApplovinAdapter";
}

private protected override string ManifestRelativePath()
{
#if UNITY_2021_2_OR_NEWER
return "Plugins/Android/TapsellMediationApplovinAdapterPlugin/AndroidManifest.xml";
#else
return "Plugins/Android/AndroidManifest.xml";
#endif

}

private protected override string MetadataApplicationKey()
{
return "applovin.sdk.key";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<dependencies>
<androidPackages>
<androidPackage spec="ir.tapsell.mediation.adapter:fyber-unity:1.0.1-beta07">
<repositories>
<repository>https://android-sdk.is.com</repository>
</repositories>
</androidPackage>
</androidPackages>
<!-- <androidPackages>-->
<!-- <androidPackage spec="ir.tapsell.mediation.adapter:fyber-unity:1.0.1-beta07">-->
<!-- <repositories>-->
<!-- <repository>https://android-sdk.is.com</repository>-->
<!-- </repositories>-->
<!-- </androidPackage>-->
<!-- </androidPackages>-->
</dependencies>
19 changes: 0 additions & 19 deletions Assets/Tapsell/Mediation/Editor/MediationManifestProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,6 @@ private protected override string PluginName()
return "TapsellMediation";
}

private protected override string ManifestRelativePath()
{
#if UNITY_2021_2_OR_NEWER
return "Plugins/Android/TapsellMediationPlugin/AndroidManifest.xml";
#else
return "Plugins/Android/AndroidManifest.xml";
#endif
}

private protected override string MetadataApplicationKey()
{
return "ir.tapsell.mediation.APPLICATION_KEY";
Expand All @@ -34,16 +25,6 @@ private protected override bool ShouldValidateMetadataApplicationValue()
{
return true;
}

private protected override string MetadataApplicationMarketKey()
{
return "ir.tapsell.mediation.APPLICATION_MARKET";
}

private protected override string MetadataApplicationMarketValue()
{
return TapsellMediationSettings.LoadInstance().TapsellAndroidAppMarketKey;
}

public override int callbackOrder => 0;
}
Expand Down
10 changes: 0 additions & 10 deletions Assets/Tapsell/Mediation/Editor/TapsellMediationSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,6 @@ public string TapsellAndroidAppKey
set => tapsellAndroidAppKey = value;
}

[SerializeField]
private string tapsellAndroidAppMarketKey = string.Empty;

public string TapsellAndroidAppMarketKey
{
get => tapsellAndroidAppMarketKey;

set => tapsellAndroidAppMarketKey = value;
}

[SerializeField]
private string admobAdapterSignature = string.Empty;

Expand Down
15 changes: 0 additions & 15 deletions Assets/Tapsell/Mediation/Editor/TapsellMediationSettingsEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ public class TapsellMediationSettingsEditor : UnityEditor.Editor
private const string AdaptersDirectory = "Assets/Tapsell/Mediation/Adapter/";

private SerializedProperty _appKeyAndroid;
private SerializedProperty _appMarketKeyAndroid;
private SerializedProperty _admobSignatureAndroid;
private SerializedProperty _applovinSignatureAndroid;

Expand All @@ -24,7 +23,6 @@ public static void OpenInspector()
public void OnEnable()
{
_appKeyAndroid = serializedObject.FindProperty("tapsellAndroidAppKey");
_appMarketKeyAndroid = serializedObject.FindProperty("tapsellAndroidAppMarketKey");
_admobSignatureAndroid = serializedObject.FindProperty("admobAdapterSignature");
_applovinSignatureAndroid = serializedObject.FindProperty("applovinAdapterSignature");
}
Expand Down Expand Up @@ -54,19 +52,6 @@ public override void OnInspectorGUI()

EditorGUI.indentLevel--;
EditorGUILayout.Separator();

// App Market key
EditorGUI.indentLevel--;
EditorGUILayout.Separator();

EditorGUILayout.LabelField("Tapsell Mediation App Market Key", EditorStyles.boldLabel);
EditorGUI.indentLevel++;

EditorGUILayout.PropertyField(_appMarketKeyAndroid, new GUIContent("Android Market"));

EditorGUILayout.HelpBox(
"Tapsell Mediation App Market Key is the market that your app is published in",
MessageType.Info);

// Adapters signatures
var admobImported = Directory.Exists(AdaptersDirectory + "Admob");
Expand Down
20 changes: 6 additions & 14 deletions Assets/Tapsell/Mediation/Editor/Utils/ManifestProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,15 @@ internal abstract class ManifestProcessor : IPreprocessBuild
#endif
{
private protected abstract string PluginName();
private protected abstract string ManifestRelativePath();

private string ManifestRelativePath()
{
return "Plugins/Android/AndroidManifest.xml";
}
private protected abstract string MetadataApplicationKey();
private protected abstract string MetadataApplicationValue();
private protected abstract bool ShouldValidateMetadataApplicationValue();
private protected virtual string MetadataApplicationMarketKey()
{
return String.Empty;
}
private protected virtual string MetadataApplicationMarketValue()
{
return String.Empty;
}

public abstract int callbackOrder { get; }

private readonly XNamespace _ns = "http://schemas.android.com/apk/res/android";
Expand Down Expand Up @@ -90,11 +87,6 @@ public void OnPreprocessBuild(BuildTarget target, string path)
.Where( elem => elem.Name.LocalName.Equals("meta-data"));

SetMetadataElement(elemApplication, metas, MetadataApplicationKey(), value);
var marketValue = MetadataApplicationMarketValue();
if (marketValue != string.Empty)
{
SetMetadataElement(elemApplication, metas, MetadataApplicationMarketKey(), marketValue);
}

elemManifest.Save(manifestPath);
}
Expand Down
Loading

0 comments on commit e3466a0

Please sign in to comment.