plugins { id 'com.android.application' id 'com.mikepenz.aboutlibraries.plugin' } android { compileSdk 32 defaultConfig { applicationId "com.fatapp.oxygentoolbox" minSdk 21 targetSdk 32 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" // Required when setting minSdkVersion to 20 or lower multiDexEnabled true } signingConfigs { release { Properties buildPro = buildSign() storeFile file(buildPro['storeFile']) storePassword buildPro['storePassword'] keyAlias buildPro['keyAlias'] keyPassword buildPro['keyPassword'] } } buildTypes { release { minifyEnabled true shrinkResources true signingConfig signingConfigs.release proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' zipAlignEnabled true } } android.applicationVariants.all { variant -> variant.outputs.all { output -> outputFileName = new File(variant.name, "OxygenToolbox" + "_" + defaultConfig.versionName + "-" + defaultConfig.versionCode + "_" + buildType.name + ".apk") } } compileOptions { // Flag to enable support for the new language APIs coreLibraryDesugaringEnabled true // Sets Java compatibility to Java 8 sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } buildFeatures { viewBinding true } namespace 'com.fatapp.oxygentoolbox' } def buildSign() { Properties buildProperties = new Properties() buildProperties.load(new FileInputStream(file("../keystore.properties"))) return buildProperties } aboutLibraries { registerAndroidTasks = false outputFileName = "dependencies.json" exclusionPatterns = [ ~'androidx.*', ~'org.jetbrains.*', ~"com.google.android.*", ~"com.google.guava:listenablefuture" ] } task exportLibrariesToJson(group: 'build', description: 'Generate libraries definitions json file', type: com.mikepenz.aboutlibraries.plugin.AboutLibrariesTask, dependsOn:'collectDependencies') { resultDirectory = project.file('src/main/res/raw/') variant = 'release' } afterEvaluate { def assembleTask = tasks.findByName("assembleDebug") assembleTask.dependsOn(exportLibrariesToJson) } dependencies { //noinspection GradleDependency coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.6' testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.3' androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' implementation 'androidx.appcompat:appcompat:1.4.2' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'androidx.preference:preference:1.2.0' implementation 'androidx.navigation:navigation-fragment-ktx:2.5.0' implementation 'androidx.navigation:navigation-ui-ktx:2.5.0' implementation 'androidx.core:core-splashscreen:1.0.0-rc01' implementation 'com.google.android.material:material:1.6.1' implementation 'com.google.code.gson:gson:2.9.0' }