mirror of
https://github.com/PhilKes/NotallyX.git
synced 2025-06-28 12:19:55 +00:00
162 lines
No EOL
5.2 KiB
Groovy
162 lines
No EOL
5.2 KiB
Groovy
import com.ncorti.ktfmt.gradle.tasks.KtfmtFormatTask
|
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
|
|
plugins {
|
|
id 'com.android.application'
|
|
id 'kotlin-android'
|
|
id 'kotlin-parcelize'
|
|
id 'com.google.devtools.ksp'
|
|
id 'com.ncorti.ktfmt.gradle' version '0.20.1'
|
|
id 'org.jetbrains.kotlin.plugin.serialization' version '1.9.0'
|
|
|
|
}
|
|
|
|
android {
|
|
compileSdk 34
|
|
namespace 'com.philkes.notallyx'
|
|
|
|
defaultConfig {
|
|
applicationId 'com.philkes.notallyx'
|
|
minSdk 21
|
|
targetSdk 34
|
|
versionCode 631
|
|
versionName "6.4.0-BETA"
|
|
resourceConfigurations += ['en', 'ca', 'cs', 'da', 'de', 'el', 'es', 'fr', 'hu', 'in', 'it', 'ja', 'my', 'nb', 'nl', 'nn', 'pl', 'pt-rBR', 'pt-rPT', 'ro', 'ru', 'sk', 'sv', 'tl', 'tr', 'uk', 'vi', 'zh-rCN']
|
|
vectorDrawables.generatedDensities = []
|
|
}
|
|
|
|
ksp {
|
|
arg("room.generateKotlin", "true")
|
|
arg("room.schemaLocation", "$projectDir/schemas")
|
|
}
|
|
|
|
signingConfigs {
|
|
release {
|
|
storeFile file(RELEASE_STORE_FILE)
|
|
storePassword RELEASE_STORE_PASSWORD
|
|
keyAlias RELEASE_KEY_ALIAS
|
|
keyPassword RELEASE_KEY_PASSWORD
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
debug {
|
|
applicationIdSuffix ".debug"
|
|
}
|
|
release {
|
|
crunchPngs false
|
|
minifyEnabled true
|
|
shrinkResources true
|
|
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
|
|
signingConfig signingConfigs.release
|
|
}
|
|
}
|
|
|
|
dependenciesInfo {
|
|
// Disables dependency metadata when building APKs.
|
|
includeInApk = false
|
|
// Disables dependency metadata when building Android App Bundles.
|
|
includeInBundle = false
|
|
}
|
|
|
|
kotlinOptions { jvmTarget = "1.8" }
|
|
|
|
buildFeatures { viewBinding true }
|
|
|
|
packagingOptions.resources {
|
|
excludes += ["DebugProbesKt.bin", "META-INF/**.version", "kotlin/**.kotlin_builtins", "kotlin-tooling-metadata.json"]
|
|
}
|
|
|
|
testOptions {
|
|
unitTests {
|
|
includeAndroidResources true
|
|
}
|
|
}
|
|
}
|
|
|
|
tasks.withType(KotlinCompile).configureEach {
|
|
kotlinOptions.jvmTarget = "1.8"
|
|
}
|
|
|
|
ktfmt {
|
|
kotlinLangStyle()
|
|
}
|
|
|
|
tasks.register('ktfmtPrecommit', KtfmtFormatTask) {
|
|
source = project.fileTree(rootDir)
|
|
include("**/*.kt")
|
|
}
|
|
|
|
tasks.register('installLocalGitHooks', Copy) {
|
|
def scriptsDir = new File(rootProject.rootDir, '.scripts/')
|
|
def hooksDir = new File(rootProject.rootDir, '.git/hooks')
|
|
from(scriptsDir) {
|
|
include 'pre-commit', 'pre-commit.bat'
|
|
}
|
|
into { hooksDir }
|
|
inputs.files(file("${scriptsDir}/pre-commit"), file("${scriptsDir}/pre-commit.bat"))
|
|
outputs.dir(hooksDir)
|
|
fileMode 0775
|
|
}
|
|
preBuild.dependsOn installLocalGitHooks
|
|
|
|
afterEvaluate {
|
|
bundleRelease.dependsOn testReleaseUnitTest
|
|
assembleRelease.dependsOn testReleaseUnitTest
|
|
}
|
|
|
|
dependencies {
|
|
testImplementation 'junit:junit:4.13.2'
|
|
androidTestImplementation 'junit:junit:4.13.2'
|
|
final def navVersion = "2.3.5"
|
|
final def roomVersion = "2.6.1"
|
|
|
|
ksp "androidx.room:room-compiler:$roomVersion"
|
|
implementation "androidx.room:room-ktx:$roomVersion"
|
|
implementation "androidx.room:room-runtime:$roomVersion"
|
|
implementation "net.zetetic:android-database-sqlcipher:4.5.3"
|
|
implementation "androidx.sqlite:sqlite-ktx:2.4.0"
|
|
implementation "androidx.security:security-crypto:1.1.0-alpha06"
|
|
implementation 'net.lingala.zip4j:zip4j:2.11.5'
|
|
|
|
implementation "androidx.work:work-runtime:2.9.1"
|
|
implementation "androidx.preference:preference-ktx:1.2.1"
|
|
|
|
//noinspection GradleDependency
|
|
implementation "androidx.navigation:navigation-ui-ktx:$navVersion"
|
|
//noinspection GradleDependency
|
|
implementation "androidx.navigation:navigation-fragment-ktx:$navVersion"
|
|
|
|
implementation "org.ocpsoft.prettytime:prettytime:4.0.6.Final"
|
|
implementation "com.google.android.material:material:1.12.0"
|
|
|
|
implementation 'com.github.zerobranch:SwipeLayout:1.3.1'
|
|
|
|
implementation "com.github.bumptech.glide:glide:4.15.1"
|
|
implementation "com.davemorrissey.labs:subsampling-scale-image-view-androidx:3.10.0"
|
|
implementation 'me.zhanghai.android.fastscroll:library:1.3.0'
|
|
|
|
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
|
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3"
|
|
implementation("org.simpleframework:simple-xml:2.7.1") {
|
|
exclude group: 'xpp3', module: 'xpp3'
|
|
}
|
|
implementation 'org.jsoup:jsoup:1.18.1'
|
|
|
|
implementation 'cat.ereza:customactivityoncrash:2.4.0'
|
|
|
|
testImplementation "junit:junit:4.13.2"
|
|
testImplementation "androidx.test:core:1.6.1"
|
|
testImplementation "androidx.test:core-ktx:1.6.1"
|
|
testImplementation 'androidx.arch.core:core-testing:2.2.0'
|
|
testImplementation "org.mockito:mockito-core:5.13.0"
|
|
testImplementation "org.mockito.kotlin:mockito-kotlin:5.4.0"
|
|
testImplementation "io.mockk:mockk:1.13.12"
|
|
testImplementation "org.json:json:20180813"
|
|
testImplementation "org.assertj:assertj-core:3.24.2"
|
|
testImplementation "org.robolectric:robolectric:4.13"
|
|
|
|
androidTestImplementation "androidx.room:room-testing:$roomVersion"
|
|
androidTestImplementation "androidx.work:work-testing:2.9.1"
|
|
|
|
} |