summaryrefslogtreecommitdiff
path: root/build-system/integration-test/test-projects/vulkan/build.gradle
blob: 3a789aac42e19ae80ccbb72a0579106bce44064f (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
apply from: "../commonHeader.gradle"
buildscript { apply from: "../commonBuildScript.gradle" }

apply plugin: 'com.android.application'

// Simple vulkan project with shaders
// Adapted from https://github.com/googlesamples/android-vulkan-tutorials/tree/master/tutorial05_triangle

android {
    namespace "com.google.vulkan.tutorials.five"
    compileSdkVersion rootProject.latestCompileSdk

    defaultConfig {
        applicationId  "com.google.vulkan.tutorials.five"
        minSdkVersion    libs.versions.ndk19SupportLibMinSdk.get()
        //noinspection ExpiringTargetSdkVersion,ExpiredTargetSdkVersion
        targetSdkVersion libs.versions.ndk19SupportLibMinSdk.get()
        versionCode 1
        versionName "0.0.1"

        // Shader compilation directives, put glsl shaders to app/src/main/shaders
        // android studio will pick them up and compile them into APK/assets/shaders
        // KNOWN ISSUE:  if shaders having errors, it takes long time for gradle to timeout
        //               but it will eventually time out and complain about shader compiling
        shaders {
            glslcArgs.addAll(['-c', '-g'])
        }
        externalNativeBuild {
            cmake {
                // armeabi is not supported, not building for mips in samples
                abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
                arguments '-DANDROID_TOOLCHAIN=clang', '-DANDROID_STL=c++_static'
            }
        }
    }
   externalNativeBuild {
        cmake {
            path 'CMakeLists.txt'
        }
    }
}