mirror of
https://github.com/CatimaLoyalty/Android.git
synced 2025-12-28 05:14:28 +00:00
166 lines
4.6 KiB
Groovy
166 lines
4.6 KiB
Groovy
import com.github.spotbugs.snom.SpotBugsTask
|
|
|
|
plugins {
|
|
id 'com.android.application'
|
|
id 'com.github.spotbugs'
|
|
}
|
|
|
|
spotbugs {
|
|
ignoreFailures = false
|
|
effort = 'max'
|
|
excludeFilter = file("./config/spotbugs/exclude.xml")
|
|
reportsDir = file("$buildDir/reports/spotbugs/")
|
|
}
|
|
|
|
android {
|
|
compileSdk 33
|
|
|
|
defaultConfig {
|
|
applicationId "me.hackerchick.catima"
|
|
minSdk 21
|
|
targetSdk 33
|
|
versionCode 131
|
|
versionName "2.26.0"
|
|
|
|
vectorDrawables.useSupportLibrary true
|
|
multiDexEnabled true
|
|
|
|
resourceConfigurations += ["ar", "bg", "bn", "bn-rIN", "bs", "cs", "da", "de", "el-rGR", "en", "eo", "es", "es-rAR", "fi", "fr", "he-rIL", "hi", "hr", "hu", "in-rID", "is", "it", "ja", "ko", "lt", "lv", "nb-rNO", "nl", "oc", "pl", "pt", "ro-rRO", "ru", "sk", "sl", "sv", "tr", "uk", "zh-rTW", "zh-rCN"]
|
|
|
|
//testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
}
|
|
|
|
flavorDimensions "version"
|
|
productFlavors {
|
|
fdroid {
|
|
dimension "version"
|
|
}
|
|
screengrab {
|
|
dimension "version"
|
|
applicationIdSuffix = ".screengrab"
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled true
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
resValue "string", "app_name", "Catima"
|
|
}
|
|
debug {
|
|
applicationIdSuffix ".debug"
|
|
resValue "string", "app_name", "Catima Debug"
|
|
}
|
|
}
|
|
|
|
buildFeatures {
|
|
viewBinding true
|
|
}
|
|
|
|
bundle {
|
|
language {
|
|
enableSplit = false
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
encoding "UTF-8"
|
|
|
|
// Flag to enable support for the new language APIs
|
|
coreLibraryDesugaringEnabled true
|
|
|
|
sourceCompatibility JavaVersion.VERSION_11
|
|
targetCompatibility JavaVersion.VERSION_11
|
|
}
|
|
|
|
|
|
sourceSets {
|
|
test {
|
|
resources.srcDirs += ['src/test/res']
|
|
}
|
|
}
|
|
|
|
// Starting with Android Studio 3 Robolectric is unable to find resources.
|
|
// The following allows it to find the resources.
|
|
testOptions {
|
|
unitTests {
|
|
all {
|
|
testLogging {
|
|
events 'started', 'passed', 'skipped', 'failed'
|
|
}
|
|
}
|
|
includeAndroidResources true
|
|
}
|
|
}
|
|
lint {
|
|
lintConfig file('lint.xml')
|
|
}
|
|
namespace 'protect.card_locker'
|
|
}
|
|
|
|
dependencies {
|
|
// AndroidX
|
|
implementation 'androidx.appcompat:appcompat:1.6.1'
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
|
implementation 'androidx.exifinterface:exifinterface:1.3.6'
|
|
implementation 'androidx.palette:palette:1.0.0'
|
|
implementation 'androidx.preference:preference:1.2.0'
|
|
implementation 'com.google.android.material:material:1.9.0'
|
|
implementation 'com.github.yalantis:ucrop:2.2.8'
|
|
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.3'
|
|
|
|
// Splash Screen
|
|
implementation 'androidx.core:core-splashscreen:1.0.1'
|
|
|
|
// Third-party
|
|
implementation 'com.journeyapps:zxing-android-embedded:4.3.0@aar'
|
|
implementation 'com.google.zxing:core:3.5.2'
|
|
implementation 'org.apache.commons:commons-csv:1.9.0'
|
|
implementation 'com.jaredrummler:colorpicker:1.1.0'
|
|
implementation 'net.lingala.zip4j:zip4j:2.11.5'
|
|
|
|
// SpotBugs
|
|
implementation 'io.wcm.tooling.spotbugs:io.wcm.tooling.spotbugs.annotations:1.0.0'
|
|
|
|
// Testing
|
|
testImplementation 'androidx.test:core:1.5.0'
|
|
testImplementation 'junit:junit:4.13.2'
|
|
testImplementation 'org.robolectric:robolectric:4.10.3'
|
|
|
|
// Screenshots
|
|
testImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
|
|
testImplementation 'com.android.support.test:rules:1.0.2'
|
|
testImplementation 'com.android.support.test:runner:1.0.2'
|
|
testImplementation 'tools.fastlane:screengrab:2.1.1'
|
|
}
|
|
|
|
tasks.withType(SpotBugsTask) {
|
|
|
|
description 'Run spotbugs'
|
|
group 'verification'
|
|
|
|
//classes = fileTree('build/intermediates/javac/debug/compileDebugJavaWithJavac/classes')
|
|
//source = fileTree('src/main/java')
|
|
//classpath = files()
|
|
|
|
reports {
|
|
xml.enabled = false
|
|
html.enabled = true
|
|
}
|
|
}
|
|
|
|
tasks.register('copyRawResFiles', Copy) {
|
|
from layout.projectDirectory.file("../CHANGELOG.md"),
|
|
layout.projectDirectory.file("../PRIVACY.md")
|
|
into layout.projectDirectory.dir("src/main/res/raw")
|
|
rename { String fileName -> fileName.toLowerCase() }
|
|
}
|
|
|
|
project.afterEvaluate {
|
|
tasks.each { task ->
|
|
if (task != copyRawResFiles) {
|
|
task.dependsOn(copyRawResFiles)
|
|
}
|
|
}
|
|
}
|