mirror of
https://github.com/readrops/Readrops.git
synced 2025-01-22 15:00:46 +01:00
94 lines
2.8 KiB
Plaintext
94 lines
2.8 KiB
Plaintext
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
|
|
|
buildscript {
|
|
val kotlin_version = "1.8.0"
|
|
|
|
repositories {
|
|
google()
|
|
mavenCentral()
|
|
}
|
|
dependencies {
|
|
classpath("com.android.tools.build:gradle:8.1.1")
|
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")
|
|
classpath("org.jacoco:org.jacoco.core:0.8.7")
|
|
}
|
|
}
|
|
|
|
allprojects {
|
|
//apply("jacoco")
|
|
|
|
repositories {
|
|
google()
|
|
mavenCentral()
|
|
maven(url = "https://jitpack.io")
|
|
}
|
|
/*afterEvaluate {
|
|
tasks.withType(JavaCompile.class) {
|
|
options.compilerArgs << "-Xmaxerrs" << "1000"
|
|
}
|
|
}*/
|
|
}
|
|
|
|
ext {
|
|
val compileSdkVersion = 34
|
|
val minSdkVersion = 21
|
|
val targetSdkVersion = 34
|
|
val buildToolsVersion = "34.0.0"
|
|
}
|
|
|
|
tasks.register<Delete>("clean") {
|
|
delete(rootProject.buildDir)
|
|
}
|
|
|
|
/*jacoco {
|
|
toolVersion = "0.8.7"
|
|
}
|
|
|
|
|
|
tasks.register("jacocoFullReport", JacocoReport) {
|
|
group = "Reporting"
|
|
description = "Generate Jacoco coverage reports for the debug build"
|
|
|
|
reports {
|
|
html {
|
|
enabled true
|
|
destination file("build/reports/jacoco/html")
|
|
}
|
|
xml {
|
|
enabled true
|
|
destination file("build/reports/jacoco/jacocoFullReport.xml")
|
|
}
|
|
}
|
|
|
|
//dependsOn ":app:testDebugUnitTest"
|
|
dependsOn ":api:testDebugUnitTest"
|
|
dependsOn ":db:testDebugUnitTest"
|
|
//dependsOn ":app:connectedAndroidTest"
|
|
dependsOn ":db:connectedAndroidTest"*/
|
|
|
|
//final fileFilter = ["**/R.class", "**/R\$*.class", "**/BuildConfig.*", "**/Manifest*.*", "android/**/*.*"]
|
|
|
|
/* classDirectories.setFrom files([
|
|
//fileTree(dir: "$project.rootDir/app/build/intermediates/javac/debug", excludes: fileFilter),
|
|
//fileTree(dir: "$project.rootDir/app/build/tmp/kotlin-classes/debug", excludes: fileFilter),
|
|
fileTree(dir: "$project.rootDir/api/build/intermediates/javac/debug", excludes: fileFilter),
|
|
fileTree(dir: "$project.rootDir/api/build/tmp/kotlin-classes/debug", excludes: fileFilter),
|
|
fileTree(dir: "$project.rootDir/db/build/tmp/kotlin-classes/debug", excludes: fileFilter),
|
|
])
|
|
def coverageSourceDirs = [
|
|
"$project.rootDir/app/src/main/java",
|
|
"$project.rootDir/api/src/main/java",
|
|
"$project.rootDir/db/src/main/java",
|
|
]
|
|
|
|
additionalSourceDirs.setFrom files(coverageSourceDirs)
|
|
sourceDirectories.setFrom files(coverageSourceDirs)
|
|
executionData.setFrom fileTree(dir: project.rootDir, includes: [
|
|
"app/jacoco.exec",
|
|
"db/jacoco.exec",
|
|
"api/jacoco.exec",
|
|
"app/build/outputs/code_coverage/debugAndroidTest/connected/*-coverage.ec",
|
|
"db/build/outputs/code_coverage/debugAndroidTest/connected/*-coverage.ec"
|
|
])
|
|
}*/
|