summaryrefslogtreecommitdiff
path: root/plugins/hello_world/build.gradle
blob: c3ecdca4b17858f23bf74056189692b9134eb772 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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.helloworld"

    // Used to customize the name of generated AAR file.
    libraryVariants.configureEach { variant ->
        variant.outputs.configureEach { output ->
            output.outputFileName = "HelloWorld.${variant.name}.aar"
        }
    }

}

dependencies {
    compileOnly libraries.godotAndroidLib
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$versions.kotlinVersion"
}

tasks.register('copyDebugAARToDemoAddons', Copy) {
    from 'build/outputs/aar'
    include 'HelloWorld.debug.aar'
    into 'demo/addons/hello_world_plugin/bin/debug'
}

tasks.register('copyReleaseAARToDemoAddons', Copy) {
    from 'build/outputs/aar'
    include 'HelloWorld.release.aar'
    into 'demo/addons/hello_world_plugin/bin/release'
}

assemble.finalizedBy(copyDebugAARToDemoAddons)
assemble.finalizedBy(copyReleaseAARToDemoAddons)