summaryrefslogtreecommitdiff
path: root/plugins/hello_world/build.gradle
blob: 4c12e931427e00cfd2b73eae9c5f2768813877a5 (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
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"
    }

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

}

dependencies {
    compileOnly "org.godotengine:godot:$versions.godotLibVersion"
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$versions.kotlinVersion"
}

task copyDebugAARToAddons(type: Copy) {
    from 'build/outputs/aar'
    include 'HelloWorld.debug.aar'
    into 'demo/addons/hello_world_plugin/export'
}

task copyReleaseAARToAddons(type: Copy) {
    from 'build/outputs/aar'
    include 'HelloWorld.release.aar'
    into 'demo/addons/hello_world_plugin/export'
}

assemble.finalizedBy(copyDebugAARToAddons)
assemble.finalizedBy(copyReleaseAARToAddons)