// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    ext {
        kotlin_version = '2.2.20'
        kotlin_coroutines_version = '1.10.2'
        kotlin_stdlib_version = '1.5.0'
        android_ktx_version = "1.17.0"
        work_version = '2.10.4'
        agp_version = '8.13.0'
    }
    repositories {
        google()
        mavenCentral()
        maven { url "https://jitpack.io" }
    }
    dependencies {
        classpath "com.android.tools.build:gradle:$agp_version"
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

        // NO FREE
        if (!project.hasProperty('free')) {
            classpath 'com.google.gms:google-services:4.4.3'
            classpath 'com.google.firebase:firebase-crashlytics-gradle:3.0.6'
            classpath 'com.google.firebase:perf-plugin:2.0.1'
        }
    }
}

plugins {
    id 'org.jetbrains.kotlin.android' version "$kotlin_version" apply false
    id 'com.google.devtools.ksp' version '2.2.20-2.0.2' apply false
}

allprojects {
    repositories {
        google()
        mavenCentral()
        maven { url "https://jitpack.io" }
        // For https://gitlab.com/AuroraOSS/gplayapi
        maven { url "https://gitlab.com/api/v4/projects/18497829/packages/maven"}
        // Getter Rust TLS
        // Due https://stackoverflow.com/questions/75904120/how-can-i-use-repositories-in-my-android-modules-build-gradle-not-in-top-level
        // Temporarily disabled due to workspace conflicts
        /*
        maven {
            url = findRustlsPlatformVerifierProject()
            metadataSources.artifact()
        }
        */
    }
}

if (project.hasProperty('free')) {
    project.logger.lifecycle('build without no free lib')
}
