1apply plugin: 'com.android.application' 2 3android { 4 compileSdkVersion 34 5 defaultConfig { 6 applicationId "com.google.oboe.samples.rhythmgame" 7 targetSdkVersion 34 8 versionCode 1 9 versionName "1.0" 10 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 11 externalNativeBuild { 12 cmake { 13 cppFlags "-std=c++17" 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 flavorDimensions "extractorLibrary" 30 productFlavors { 31 ndkExtractor { 32 dimension "extractorLibrary" 33 34 // Oboe has a minimum API of 16, but AMediaExtractor (used to extract the MP3 assets) 35 // is only available from API 21. 36 // For further backward compatibility consider using FFmpeg (see below) 37 minSdkVersion 21 38 externalNativeBuild { 39 cmake { 40 arguments "-DUSE_FFMPEG=0" 41 } 42 } 43 } 44 /** 45 * To use FFmpeg for asset extraction do the following: 46 * - Uncomment this block 47 * - Change the build variant to ffmpegExtractor 48 * - Update the FFMPEG_DIR variable in CMakeLists.txt to the local FFmpeg path 49 */ 50 /* 51 ffmpegExtractor { 52 dimension "extractorLibrary" 53 minSdkVersion 16 54 externalNativeBuild { 55 cmake { 56 arguments "-DUSE_FFMPEG=1" 57 } 58 } 59 } 60 */ 61 } 62} 63 64dependencies { 65 implementation fileTree(dir: 'libs', include: ['*.jar']) 66 implementation 'androidx.appcompat:appcompat:1.6.0-rc01' 67 implementation 'androidx.constraintlayout:constraintlayout:1.1.3' 68} 69