Skip to content

Commit 3b483ea

Browse files
committed
wip
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
1 parent c087f8e commit 3b483ea

1 file changed

Lines changed: 22 additions & 9 deletions

File tree

app/build.gradle.kts

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/*
22
* Nextcloud - Android Client
33
*
4+
* SPDX-FileCopyrightText: 2026 Alper Ozturk <alper.ozturk@nextcloud.com>
45
* SPDX-FileCopyrightText: 2025 Jimly Asshiddiqy <jimly.asshiddiqy@accenture.com>
56
* SPDX-License-Identifier: AGPL-3.0-or-later
67
*/
@@ -277,7 +278,7 @@ spotbugs {
277278
}
278279

279280
tasks.register<Checkstyle>("checkstyle") {
280-
description = "checks style"
281+
description = "Runs Checkstyle static analysis on the Java sources to enforce the project's coding style."
281282
configFile = file("${rootProject.projectDir}/checkstyle.xml")
282283
setConfigProperties(
283284
"checkstyleSuppressionsPath" to file("${rootProject.rootDir}/suppressions.xml").absolutePath
@@ -289,7 +290,7 @@ tasks.register<Checkstyle>("checkstyle") {
289290
}
290291

291292
tasks.register<Pmd>("pmd") {
292-
description = "pmd"
293+
description = "Runs PMD static analysis on the Java sources to detect common programming flaws and bad practices."
293294
ruleSetFiles = files("${rootProject.rootDir}/ruleset.xml")
294295
ignoreFailures = true // should continue checking
295296
ruleSets = emptyList()
@@ -345,6 +346,17 @@ tasks.named("check").configure {
345346
dependsOn("checkstyle", "spotbugsGplayDebug", "pmd", "lint", "spotlessKotlinCheck", "detekt")
346347
}
347348

349+
val kspConfiguration = "ksp"
350+
val kspAndroidTestConfiguration = "kspAndroidTest"
351+
val gplayImplementationConfiguration = "gplayImplementation"
352+
val huaweiImplementationConfiguration = "huaweiImplementation"
353+
val qaImplementationConfiguration = "qaImplementation"
354+
val appScanConfigurations = listOf(
355+
gplayImplementationConfiguration,
356+
huaweiImplementationConfiguration,
357+
qaImplementationConfiguration
358+
)
359+
348360
dependencies {
349361
// region Nextcloud library
350362
implementation(libs.android.library) {
@@ -442,10 +454,10 @@ dependencies {
442454
// endregion
443455

444456
// region AppScan, document scanner not available on FDroid (generic) due to OpenCV binaries
445-
// To enable the feature for another variant, add it here.
446-
"gplayImplementation"(project(":appscan"))
447-
"huaweiImplementation"(project(":appscan"))
448-
"qaImplementation"(project(":appscan"))
457+
// To enable the feature for another variant, add its "<variant>Implementation" here.
458+
appScanConfigurations.forEach { configuration ->
459+
add(configuration, project(":appscan"))
460+
}
449461
// endregion
450462

451463
// region SpotBugs
@@ -457,9 +469,10 @@ dependencies {
457469
implementation(libs.dagger)
458470
implementation(libs.dagger.android)
459471
implementation(libs.dagger.android.support)
460-
ksp(libs.dagger.compiler)
461472
ksp(libs.dagger.processor)
462-
kspAndroidTest(libs.dagger.compiler)
473+
listOf(kspConfiguration, kspAndroidTestConfiguration).forEach { configuration ->
474+
add(configuration, libs.dagger.compiler)
475+
}
463476
// endregion
464477

465478
// region Crypto
@@ -522,7 +535,7 @@ dependencies {
522535
// endregion
523536

524537
// region Google Play dependencies, upon each update first test: new registration, receive push
525-
"gplayImplementation"(libs.bundles.gplay)
538+
add(gplayImplementationConfiguration, libs.bundles.gplay)
526539
// endregion
527540

528541
// region common

0 commit comments

Comments
 (0)