Hi there!
While working on the app, we need to enable the “Ad Review” feature from AppLovin, as explained here: https://support.applovin.com/hc/en-us/articles/13883454177421
To do this, just follow two simple steps:
- Additions to root-level build.gradle file:
buildscript {
repositories {
maven { url 'https://artifacts.applovin.com/android' }
}
dependencies {
classpath "com.applovin.quality:AppLovinQualityServiceGradlePlugin:+"
}
}
- Additions to app-level build.gradle file:
apply plugin: 'applovin-quality-service'
applovin {
apiKey "ad-review-key"
}
In the test application built in Android Studio, everything works as expected (AppLovin provides a Mediation Debugger which displays debug information). Defold doesn’t distinguish between root-level and app-level build.gradle files. We can only use the build.gradle files of native plugins to add dependencies. It’s not possible to add a buildscript section to these files. (AFAIK)
I created a Docker image of the Extender to examine how the build server operates “under the hood”. It turns out there’s a single build.gradle file (from /extender/server/docker-base/template.build.gradle
) to which build.gradle files from all the plugins are applied during the server’s operation (apply from ).
In Android Studio, I followed a similar approach (consolidated everything into a single root-level build.gradle) and successfully built the test application. Then, I modified the mentioned template.build.gradle, built the Extender, and used it to build the production application (not a test one). During the build process, no errors occurred. Information about the plugin appeared, similar to when building a test application in Android Studio. After the app build was completed, APK files were generated. However, according to the information from the Mediation Debugger, the final application doesn’t include the required plugin.
Based on the above, there are two questions:
-
Is it possible to enable this functionality without using our own Extender?
-
If not, and we need to use our own Extender, are there any specific considerations for adding such plugins?
P.S. If needed, I can show the build.gradle
files that were generated for the test application and the production one.
Thank you!