plugins { id 'io.sentry.android.gradle' version '6.4.0' } def buildAsLibrary = project.hasProperty('BUILD_AS_LIBRARY'); def buildAsApplication = !buildAsLibrary if (buildAsApplication) { apply plugin: 'com.android.application' } else { apply plugin: 'com.android.library' } android { if (buildAsApplication) { namespace "com.tele.u8emulator" } compileSdkVersion 35 defaultConfig { minSdkVersion 24 targetSdkVersion 35 versionCode 1 versionName "1.0.0" externalNativeBuild { //ndkBuild { // arguments "APP_PLATFORM=android-19" // abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64' //} cmake { arguments "-DANDROID_CPP_FEATURES=rtti;exceptions" abiFilters 'armeabi-v7a', 'arm64-v8a' } } } splits { abi { enable true reset() include "armeabi-v7a", "arm64-v8a" universalApk true } } signingConfigs { release { storeFile file("hieuxyz.keystore") storePassword "hieuxyz" keyAlias "hieuxyz" keyPassword "hieuxyz" } } buildTypes { release { signingConfig signingConfigs.release minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } debug { signingConfig signingConfigs.release applicationIdSuffix '.debug' versionNameSuffix '-debug' minifyEnabled false } } compileOptions { sourceCompatibility JavaVersion.VERSION_21 targetCompatibility JavaVersion.VERSION_21 } applicationVariants.all { variant -> variant.outputs.all { output -> def abiName = output.getFilter(com.android.build.OutputFile.ABI) if (abiName == null) { abiName = "universal" } outputFileName = "u8emulator-${variant.name}-${abiName}-v${variant.versionName}.apk" } variant.mergeAssetsProvider.configure { dependsOn("externalNativeBuild${variant.name.capitalize()}") } } if (!project.hasProperty('EXCLUDE_NATIVE_LIBS')) { sourceSets.main { jniLibs.srcDir 'libs' } externalNativeBuild { //ndkBuild { // path 'jni/Android.mk' //} cmake { path '../CMakeLists.txt' // version '3.31.6' } } } lint { abortOnError false } if (buildAsLibrary) { libraryVariants.all { variant -> variant.outputs.each { output -> def outputFile = output.outputFile if (outputFile != null && outputFile.name.endsWith(".aar")) { def fileName = "org.libsdl.app.aar"; output.outputFile = new File(outputFile.parent, fileName); } } } } } dependencies { implementation 'androidx.core:core:1.5.0' //implementation 'androidx.appcompat:appcompat:1.3.0' implementation fileTree(include: ['*.jar'], dir: 'libs') } sentry { org = "t5-j7" projectName = "android" // this will upload your source code to Sentry to show it as part of the stack traces // disable if you don't want to expose your sources includeSourceContext = false }