bdovaz
February 1, 2017, 8:19pm
1
I see that since 5.5.1p1 there is:
- Android: Gradle export now supports custom template
- Android: Gradle export troubleshooting added
And as I have encountered this problem:
https://code.google.com/p/analytics-issues/issues/detail?id=784
I see that I could fix it with:
android {
defaultConfig.applicationId = “my.package.id”
}
But how can I create a custom template?
Thanks!
@Yury-Habets
This should be included in Unity’s default build template:
{INSTALL_PATH}\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\GradleTemplates\mainTemplate.gradle
android {
defaultConfig {
applicationId APPLICATIONID (or whatever “variable” you have defined internally by Unity)
}
}
So we can include ${applicationId} in our AAR packages and get correctly replaced.
Done.
It will take some time to get into our code mainline, and then get backported to 5.5 and 5.6. Will appear in some patch releases of 5.5 and 5.6 - check the release notes!