Skip to content

Commit

Permalink
Fixed duplicate class with play-services-games and UE 5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Str4tos committed May 27, 2024
1 parent 143a8a2 commit b04596e
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions Source/CleverAdsSolutions/CAS_UPL_Android.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
<!-- End Init Mediation -->
<setBoolFromProperty result="UseAdvertisingId" ini="Engine" section="/Script/CleverAdsSolutions.CASDefaultConfig" property="UseAdvertisingId" default="true"/>
<setStringFromProperty result="GoogleCustomAppId" ini="Engine" section="CASPluginBuildConfig" property="GoogleAppIdAndroid" default="$S(GoogleAppId)"/>
<setBoolIsEqual result="UEVersion4" arg1="$I(EngineMajorVersion)" arg2="4"/>
<setBoolIsLessEqual result="UEVersionMinor2" arg1="$I(EngineMinorVersion)" arg2="2"/>
<setBoolOr result="UE_5_2_OrLess" arg1="$B(UEVersion4)" arg2="$B(UEVersionMinor2)"/>
</init>
<minimumSDKAPI>
<insertValue value="21"/>
Expand Down Expand Up @@ -146,13 +149,6 @@
</AARImports>
<buildGradleAdditions>
<insert>
android {
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
}

allprojects {
repositories {
<!-- Begin Repos -->
Expand Down Expand Up @@ -196,14 +192,23 @@ allprojects {
<!-- End Repos -->
}
}

</insert>
<if condition="UE_5_2_OrLess"><true>
<insert>
android {
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
}
dependencies {
// Prefer newer versions of Play Services, particularly for below UE 5.2
implementation "com.google.android.gms:play-services-auth:[16.0.1,)"
implementation "com.google.android.gms:play-services-games:[17.0.0,)"
implementation "com.google.android.gms:play-services-nearby:[16.0.0,)"
implementation "com.google.android.gms:play-services-plus:[16.0.0,)"
}
</insert>
</insert>
</true></if>
</buildGradleAdditions>
</root>

0 comments on commit b04596e

Please sign in to comment.