apply plugin: 'com.android.application'

android {
  // app can use the API features included in this API level and lower.
  compileSdk 36

  // can override some attributes in main/AndroidManifest.xml
  defaultConfig {
    applicationId 'net.sourceforge.smallbasic'
    minSdkVersion 21
    targetSdkVersion 36
    versionCode 88
    versionName '12.31'
    resourceConfigurations += ['en']
  }

  signingConfigs {
    release {
      Properties properties = new Properties()
      properties.load(project.rootProject.file('local.properties').newDataInputStream())
      storeFile file(properties.getProperty('storeFile'))
      keyAlias properties.getProperty('keyAlias')
      storePassword properties.getProperty('storePassword')
      keyPassword properties.getProperty('keyPassword')
    }
  }

  buildTypes {
    release {
      ndk {
        debugSymbolLevel = 'FULL'
      }
      shrinkResources true
      minifyEnabled true
      proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
      signingConfig signingConfigs.release
    }
  }

  externalNativeBuild {
    ndkBuild {
      path '../jni/Android.mk'
    }
  }

  namespace 'net.sourceforge.smallbasic'

  packagingOptions {
    jniLibs {
      useLegacyPackaging = true
    }
  }
}

dependencies {
  implementation 'androidx.core:core:1.12.0'
  implementation files('libs/ioio-release.aar')
  testImplementation 'junit:junit:4.13.2'
}
