apply plugin: 'com.android.application' // Load keystore properties def keystorePropertiesFile = rootProject.file("keystore.properties") def keystoreProperties = new Properties() if (keystorePropertiesFile.exists()) { keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) } android { namespace "io.github.sankalp.lunox" compileSdkVersion 34 buildToolsVersion "34.0.0" defaultConfig { applicationId "io.github.sankalp.lunox" minSdkVersion 26 targetSdkVersion 34 versionCode 20 versionName "0.20" // resConfigs "en" buildConfigField "boolean", "enableColorSniffer", "false" } buildFeatures { buildConfig true } signingConfigs { release { if (keystoreProperties['storeFile'] != null) { keyAlias keystoreProperties['keyAlias'] keyPassword keystoreProperties['keyPassword'] storeFile file(keystoreProperties['storeFile']) storePassword keystoreProperties['storePassword'] } } } buildTypes { debug { applicationIdSuffix ".debug" resValue "string", "app_name", "Lunox Dev" debuggable true jniDebuggable true versionNameSuffix "-debug" minifyEnabled false shrinkResources false } release { signingConfig signingConfigs.release debuggable false jniDebuggable false minifyEnabled true shrinkResources true zipAlignEnabled true resValue "string", "app_name", "Lunox" proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } compileOptions { sourceCompatibility JavaVersion.VERSION_11 targetCompatibility JavaVersion.VERSION_11 } lintOptions { checkReleaseBuilds false abortOnError false } applicationVariants.all { variant -> variant.outputs.all { def date = new Date() def formattedDate = date.format('yyyyMMddHHmmss') outputFileName = "Lunox-${variant.name}-${variant.versionName}-${formattedDate}.apk" } } packagingOptions { // Exclude unnecessary files to reduce APK size pickFirst '**/libc++_shared.so' pickFirst '**/libjsc.so' exclude 'META-INF/DEPENDENCIES' exclude 'META-INF/LICENSE' exclude 'META-INF/LICENSE.txt' exclude 'META-INF/license.txt' exclude 'META-INF/NOTICE' exclude 'META-INF/NOTICE.txt' exclude 'META-INF/notice.txt' exclude 'META-INF/ASL2.0' exclude 'META-INF/*.kotlin_module' } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation project(':flowlayout:layouts') debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.13' } static String getGitWorkingBranch() { try { def gitProcess = "git rev-parse --abbrev-ref HEAD".execute() gitProcess.waitFor() if (gitProcess.exitValue() == 0) { return gitProcess.text.trim() } else { // .git folder not present return "" } } catch (IOException ignored) { // git is not installed return "" } }