1apply plugin: 'com.android.application' 2 3android { 4 compileSdkVersion 29 5 externalNativeBuild { 6 cmake { 7 path "CMakeLists.txt" 8 } 9 } 10 signingConfigs { 11 juceSigning { 12 storeFile file("${System.properties['user.home']}${File.separator}.android${File.separator}debug.keystore") 13 storePassword "android" 14 keyAlias "androiddebugkey" 15 keyPassword "android" 16 storeType "jks" 17 } 18 } 19 20 defaultConfig { 21 applicationId "com.juce.networkgraphicsdemo" 22 minSdkVersion 16 23 targetSdkVersion 29 24 externalNativeBuild { 25 cmake { 26 arguments "-DANDROID_TOOLCHAIN=clang", "-DANDROID_PLATFORM=android-16", "-DANDROID_STL=c++_static", "-DANDROID_CPP_FEATURES=exceptions rtti", "-DANDROID_ARM_MODE=arm", "-DANDROID_ARM_NEON=TRUE", "-DCMAKE_CXX_STANDARD=14", "-DCMAKE_CXX_EXTENSIONS=OFF" 27 } 28 } 29 } 30 31 buildTypes { 32 debug { 33 initWith debug 34 debuggable true 35 jniDebuggable true 36 signingConfig signingConfigs.juceSigning 37 } 38 release { 39 initWith release 40 debuggable false 41 jniDebuggable false 42 signingConfig signingConfigs.juceSigning 43 } 44 } 45 46 flavorDimensions "default" 47 productFlavors { 48 debug_ { 49 ndk { 50 abiFilters "armeabi-v7a", "x86" 51 } 52 externalNativeBuild { 53 cmake { 54 arguments "-DJUCE_BUILD_CONFIGURATION=DEBUG", "-DCMAKE_CXX_FLAGS_DEBUG=-Ofast", "-DCMAKE_C_FLAGS_DEBUG=-Ofast" 55 } 56 } 57 58 dimension "default" 59 } 60 release_ { 61 externalNativeBuild { 62 cmake { 63 arguments "-DJUCE_BUILD_CONFIGURATION=RELEASE", "-DCMAKE_CXX_FLAGS_RELEASE=-O3", "-DCMAKE_C_FLAGS_RELEASE=-O3" 64 } 65 } 66 67 dimension "default" 68 } 69 } 70 71 variantFilter { variant -> 72 def names = variant.flavors*.name 73 if (names.contains ("debug_") 74 && variant.buildType.name != "debug") { 75 setIgnore(true) 76 } 77 if (names.contains ("release_") 78 && variant.buildType.name != "release") { 79 setIgnore(true) 80 } 81 } 82 83 sourceSets { 84 main.java.srcDirs += 85 ["../../../../../modules/juce_core/native/javacore/init", 86 "../../../../../modules/juce_core/native/javacore/app", 87 "../../../../../modules/juce_gui_basics/native/javaopt/app"] 88 89 main.res.srcDirs += 90 [] 91 } 92 93 repositories { 94 } 95 96 dependencies { 97 } 98 99 100 101} 102 103