I’m writing an Android plugin for Unity in Android Studio (2023.1.1 patch 1), but to streamline my process, I would like the .aar to be built directly into a folder in my Unity project. To achieve this, I want to write a bit of code that moves the .aar from the original build folder to a different one after building completes.

The current project hierarchy in Android Studio is an AndroidProject, with a Module that is used to create the actual android plugin for use in Unity. The module has a build.gradle.kts.

Trying to search on how to do this has lead me to many different versions and iterations of gradle, kotlin, and other tools, with a lot of deprecated code or formatting that no longer works. I’m very new to android plugin development, and the lack of up to date tutorials makes the learning process extremely stunted (so far).

I’ve tried registering tasks with ‘doLast’, but nothing has worked so far.

Can anyone point me in the right direction on how to achieve this? It sounds relatively simple but nothing I can find online has been relevant.



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *