/*
 * Copyright 2021 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

apply plugin: 'com.android.application'

android {
    compileSdkVersion 36
    ndkVersion '27.2.12479018'

    defaultConfig {
        applicationId 'com.android.example.games.adpf'
        minSdkVersion 24
        targetSdkVersion 36
        versionCode     5
        versionName    '1.2.2'
        externalNativeBuild {
            cmake {
                arguments '-DANDROID_STL=c++_shared',
                          '-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON'
            }
        }
    }
    buildTypes {
        release {
            minifyEnabled = false
            proguardFiles getDefaultProguardFile('proguard-android.txt'),
                          'proguard-rules.pro'
        }
    }
    externalNativeBuild {
        cmake {
            path 'src/main/cpp/CMakeLists.txt'
        }
    }
    buildFeatures {
        prefab true
    }
    namespace 'com.android.example.games'
    lint {
        abortOnError false
    }
}

dependencies {
    implementation "androidx.lifecycle:lifecycle-viewmodel:2.2.0"
    implementation "androidx.lifecycle:lifecycle-livedata:2.2.0"
    implementation "androidx.lifecycle:lifecycle-runtime:2.2.0"
    implementation "androidx.core:core:1.5.0"
    implementation "androidx.constraintlayout:constraintlayout:2.0.4"
    implementation 'androidx.fragment:fragment:1.2.5'
    implementation "androidx.games:games-activity:3.0.5"
    implementation "androidx.games:games-frame-pacing:2.1.2"

    // Example of using local .aar files in libs/ directory.
    // Comment out the androidx.games implementation lines if
    // you use a local lib.
    //implementation fileTree(dir: 'libs', include: ['GameActivity.aar', 'GameController.aar'])
}