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 19 versionName "0.19" //resConfigs "en", "de" 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 false shrinkResources false 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 { } } 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 "" } }