plugins {
    id 'com.android.application'
}

group = 'com.b3dgs.lionheart'
version = '1.4.0'

android {
    packagingOptions {
        jniLibs {
            excludes += ['**/lionheart/**']
        }
        resources {
            excludes += ['**/lionheart/**']
        }
    }

    signingConfigs {
        app {
            storeFile file(property('keystore'))
            keyAlias property('keystore.alias')
            keyPassword property('keystore.password')
            storePassword property('keystore.storepassword')
        }
    }
    compileSdk 34
    defaultConfig {
        applicationId "com.b3dgs.lionheart"
        minSdkVersion 21
        targetSdkVersion 34
        signingConfig signingConfigs.app
    }
    buildTypes {
        release {
            shrinkResources false
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.app
        }
        debug {
            signingConfig signingConfigs.app
        }
    }
    compileOptions {
        coreLibraryDesugaringEnabled true

        sourceCompatibility JavaVersion.VERSION_17
        targetCompatibility JavaVersion.VERSION_17
    }

    sourceSets {
        main {
            assets.srcDirs = ['src/main/assets/', '../../lionheart-assets/src/main/resources/', '../../lionheart-raster/src/main/resources/']
            jniLibs.srcDir 'jniLibs'
        }
    }
    androidResources {
        ignoreAssetsPattern 'stage.png:stage1.png:stage2.png:stage3.png:stage_hard.png:stage1_hard.png:stage2_hard.png:stage3_hard.png'
    }
    namespace 'com.b3dgs.lionheart'
}

dependencies {
    coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'
    //noinspection GradleDependency
    implementation 'net.java.dev.jna:jna:5.12.1@aar'
    implementation 'com.b3dgs:b3dgs-parent:2.0.0-SNAPSHOT'
    implementation 'com.b3dgs.lionengine:lionengine-core:10.0.0-SNAPSHOT'
    implementation 'com.b3dgs.lionengine:lionengine-core-android:10.0.0-SNAPSHOT'
    implementation 'com.b3dgs.lionengine:lionengine-audio-sc68:10.0.0-SNAPSHOT'
    implementation 'com.b3dgs.lionheart:lionheart-game:1.4.0-SNAPSHOT'
}
