plugins { id 'com.android.library' id 'org.jetbrains.kotlin.android' } android { compileSdk versions.compileSdk defaultConfig { minSdk versions.minSdk targetSdk versions.targetSdk versionCode 1 versionName "1.0" } namespace = "fhuyakou.godot.plugin.android.hellosignals" // Used to customize the name of generated AAR file. libraryVariants.configureEach { variant -> variant.outputs.configureEach { output -> output.outputFileName = "HelloSignals.${variant.name}.aar" } } } dependencies { compileOnly libraries.godotAndroidLib implementation "org.jetbrains.kotlin:kotlin-stdlib:$versions.kotlinVersion" } tasks.register('copyDebugAARToDemoAddons', Copy) { from 'build/outputs/aar' include 'HelloSignals.debug.aar' into 'demo/addons/hello_signals_plugin/bin/debug' } tasks.register('copyReleaseAARToDemoAddons', Copy) { from 'build/outputs/aar' include 'HelloSignals.release.aar' into 'demo/addons/hello_signals_plugin/bin/release' } tasks.register('copyAddonsToDemo', Copy) { finalizedBy(copyDebugAARToDemoAddons) finalizedBy(copyReleaseAARToDemoAddons) doFirst { delete('demo/addons/hello_signals_plugin') } from 'src/main/assets/addons/hello_signals_plugin' into 'demo/addons/hello_signals_plugin' } assemble.finalizedBy(copyAddonsToDemo) assemble.finalizedBy(copyDebugAARToDemoAddons) assemble.finalizedBy(copyReleaseAARToDemoAddons)