xref: /aosp_15_r20/system/extras/simpleperf/demo/SimpleperfExampleCpp/app/build.gradle (revision 288bf5226967eb3dac5cce6c939ccc2a7f2b4fe5)
1plugins {
2    id 'com.android.application'
3}
4
5android {
6    compileSdkVersion 32
7
8    defaultConfig {
9        applicationId "simpleperf.example.cpp"
10        minSdkVersion 24
11        targetSdkVersion 32
12        versionCode 1
13        versionName "1.0"
14
15        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
16        externalNativeBuild {
17            cmake {
18                cppFlags '-std=c++17'
19                // Cmake Debug build type uses -O0, which makes the code slow. So use release build.
20                arguments "-DCMAKE_BUILD_TYPE=Release"
21            }
22        }
23    }
24
25    buildTypes {
26        release {
27            minifyEnabled false
28            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
29        }
30    }
31    compileOptions {
32        sourceCompatibility JavaVersion.VERSION_1_8
33        targetCompatibility JavaVersion.VERSION_1_8
34    }
35    externalNativeBuild {
36        cmake {
37            path file('src/main/cpp/CMakeLists.txt')
38            version '3.18.1'
39        }
40    }
41    buildFeatures {
42        viewBinding true
43    }
44}
45
46dependencies {
47
48    implementation 'androidx.appcompat:appcompat:1.3.1'
49    implementation 'com.google.android.material:material:1.2.1'
50    implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
51    implementation 'androidx.navigation:navigation-fragment:2.3.0'
52    implementation 'androidx.navigation:navigation-ui:2.3.0'
53    testImplementation 'junit:junit:4.+'
54    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
55    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
56}