buildscript {
    repositories {
		mavenCentral()
        google();
    }
    dependencies {
		classpath 'com.android.tools.build:gradle:8.7.3'
        classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.23' }

}

repositories {
    mavenLocal()
	mavenCentral()
    google()
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

android {
    namespace "org.andstatus.game2048"
	compileOptions {
		sourceCompatibility JavaVersion.VERSION_1_8
		targetCompatibility JavaVersion.VERSION_1_8
	}
    installation {
        installOptions '-r'
        timeOutInMs 30 * 1000
    }
    lint {
        disable 'GradleCompatible'
    }
    kotlinOptions {
        jvmTarget = "1.8"
        freeCompilerArgs += "-Xmulti-platform"
        freeCompilerArgs += "-Xopt-in=kotlin"
    }
    packagingOptions {
        jniLibs {
            excludes += ['META-INF/LGPL*']
        }
        resources {
            excludes += [
                'META-INF/DEPENDENCIES',
                'META-INF/LICENSE',
                'META-INF/LICENSE.txt',
                'META-INF/license.txt',
                'META-INF/NOTICE',
                'META-INF/NOTICE.txt',
                'META-INF/notice.txt',
                'META-INF/LGPL*',
                'META-INF/AL2.0',
                'META-INF/*.kotlin_module',
                '**/*.kotlin_metadata',
                '**/*.kotlin_builtins'
            ]
        }
    }
    compileSdk 35
    defaultConfig {
        applicationId 'org.andstatus.game2048'
        minSdkVersion 24
        targetSdkVersion 35
        versionCode 44
        versionName '1.15.1'

        archivesBaseName = "game2048-android-$versionName"
    }
    buildTypes {
        debug {
            minifyEnabled false
        }
        release {
            minifyEnabled false
        }
    }
    sourceSets {
        main {
            manifest.srcFile '../src/androidMain/AndroidManifest.xml'
            java.srcDirs += [
                    "../src/commonMain/kotlin",
                    "../src/androidMain/kotlin"]
            assets.srcDirs += [
                    "../src/commonMain/resources"]
            res.srcDirs  += [
                    "../src/commonMain/resources/res"]
        }
    }
}

dependencies {
    def korgeVersion = '5.4.0'

    implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.23'
    implementation "com.soywiz.korge:korge-android:$korgeVersion"
    implementation "com.soywiz.korge:korge-core-android:$korgeVersion"
}
