1apply plugin: 'com.android.application' 2 3android { 4 compileSdkVersion 28 5 defaultConfig { 6 applicationId "com.google.oboe.samples.rhythmgame" 7 targetSdkVersion 28 8 versionCode 1 9 versionName "1.0" 10 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 11 externalNativeBuild { 12 cmake { 13 cppFlags "-std=c++14" 14 abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64' 15 } 16 } 17 } 18 buildTypes { 19 release { 20 minifyEnabled false 21 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 22 } 23 } 24 externalNativeBuild { 25 cmake { 26 path "CMakeLists.txt" 27 } 28 } 29 sourceSets { 30 main { 31 jniLibs.srcDirs = ['libs'] 32 } 33 } 34 flavorDimensions "extractorLibrary" 35 productFlavors { 36 ndkExtractor { 37 dimension "extractorLibrary" 38 39 // Oboe has a minimum API of 16, but AMediaExtractor (used to extract the MP3 assets) 40 // is only available from API 21. 41 // For further backward compatibility consider using FFmpeg (see below) 42 minSdkVersion 21 43 externalNativeBuild { 44 cmake { 45 arguments "-DUSE_FFMPEG=0" 46 } 47 } 48 } 49 /** 50 * To use FFmpeg for asset extraction do the following: 51 * - Uncomment this block 52 * - Change the build variant to ffmpegExtractor 53 * - Update the FFMPEG_DIR variable in CMakeLists.txt to the local FFmpeg path 54 */ 55 /* 56 ffmpegExtractor { 57 dimension "extractorLibrary" 58 minSdkVersion 16 59 externalNativeBuild { 60 cmake { 61 arguments "-DUSE_FFMPEG=1" 62 } 63 } 64 }*/ 65 } 66} 67 68dependencies { 69 implementation fileTree(dir: 'libs', include: ['*.jar']) 70 implementation 'androidx.appcompat:appcompat:1.0.0-rc02' 71 implementation 'androidx.constraintlayout:constraintlayout:1.1.3' 72} 73