//******************************************************************************
// SCICHART® Copyright SciChart Ltd. 2011-2022. All rights reserved.
//
// Web: http://www.scichart.com
// Support: support@scichart.com
// Sales:   sales@scichart.com
//
// build.gradle is part of the SCICHART® Examples. Permission is hereby granted
// to modify, create derivative works, distribute and publish any part of this source
// code whether for commercial, private or personal use.
//
// The SCICHART® examples are distributed in the hope that they will be useful, but
// without any warranty. It is provided "AS IS" without warranty of any kind, either
// expressed or implied.
//******************************************************************************

apply plugin: 'java'

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:8.8.2'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files

        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21"
    }
}

java {
    sourceCompatibility = JavaVersion.VERSION_1_8
    targetCompatibility = JavaVersion.VERSION_1_8
}

ext {
    minSdkVersion = project.hasProperty('minSdkVersion') ? project.getProperty('minSdkVersion') : 21
    compileSdkVersion = project.hasProperty('compileSdkVersion') ? project.getProperty('compileSdkVersion') : 35
    buildToolsVersion = project.hasProperty('buildToolsVersion') ? project.getProperty('buildToolsVersion') : '35.0.0'
    ndkVersion = project.hasProperty('ndkVersion') ? project.getProperty('ndkVersion') : '28.0.13004108'

    androidxAnnotationVersion = project.hasProperty('androidxAnnotationVersion') ? project.getProperty('androidxAnnotationVersion') : '1.1.0'

    testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

    junitVersion = '4.13.2'
    junitTestRunnerVersion = '1.2.1'
    testRunnerVersion = '1.6.2'
    testRulesVersion = '1.6.1'
    hamcrestVersion = '2.2'
    mockitoVersion = '5.16.0'
    robolectricVersion = '4.7.3'
    androidTestCore = '1.1.0'

    abiFiltersList = ['x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a']

    sourceCompatibility = JavaVersion.VERSION_1_8

    minifyEnabled = true

    versionCode = project.hasProperty('versionCode') ? project.getProperty('versionCode').toInteger() : 1
    versionName = project.hasProperty('versionName') ? project.getProperty('versionName') : "1.0"
    documentationFolder = "${rootDir}/outputJavadoc/"
    apiDocumentationFolder = "${rootDir}/outputApiDocs/"

    availableProcessors = Runtime.runtime.availableProcessors()
}


allprojects {
    repositories {
        google()
        mavenCentral()
    }
}

