Skip to content

Instantly share code, notes, and snippets.

@mattbajorek
Created April 5, 2020 18:10
Show Gist options
  • Save mattbajorek/8871110a959c3fe8c42f8a6a0419b5b7 to your computer and use it in GitHub Desktop.
Save mattbajorek/8871110a959c3fe8c42f8a6a0419b5b7 to your computer and use it in GitHub Desktop.
Copying build output to Unity's Android Plugin folder
afterEvaluate {
assembleDebug.finalizedBy(exportAARDebug)
}
task deleteOldAARDebug(type: Delete) {
delete '../../UnityPluginExample/Assets/Plugins/Android/nativecalculations-debug.aar'
}
task exportAARDebug(type: Copy) {
from('build/outputs/aar')
include('nativecalculations-debug.aar')
into('../../UnityPluginExample/Assets/Plugins/Android')
}
exportAARDebug.dependsOn(deleteOldAARDebug)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment