From 586a1134cc23b43411d40677654d45e910029732 Mon Sep 17 00:00:00 2001 From: vgaidarji Date: Fri, 15 Mar 2024 21:33:28 +0200 Subject: [PATCH] Update coveralls plugin and fix buildDir --- app/build.gradle | 2 +- app/config/jacoco.gradle | 6 +++--- app/config/quality.gradle | 6 +++--- build.gradle | 9 ++++----- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 33eb780..1e351f9 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -5,7 +5,7 @@ apply plugin: 'com.google.firebase.appdistribution' apply plugin: 'com.google.firebase.crashlytics' apply from: 'config/quality.gradle' apply from: 'config/jacoco.gradle' -//apply from: 'config/coveralls.gradle' +apply from: 'config/coveralls.gradle' def versionMajor = 1 def versionMinor = 0 diff --git a/app/config/jacoco.gradle b/app/config/jacoco.gradle index c115f0a..dec16a6 100644 --- a/app/config/jacoco.gradle +++ b/app/config/jacoco.gradle @@ -6,14 +6,14 @@ ext { jacoco { toolVersion = "0.8.11" - reportsDirectory = file("$buildDir/reports") + reportsDirectory = file("${buildDir}/reports") } task jacocoTestReport(type:JacocoReport, dependsOn: "testDebugUnitTest") { group = "Reporting" description = "Generate Jacoco coverage reports for Debug build" classDirectories = fileTree( - dir: "$buildDir/tmp/kotlin-classes/debug", + dir: "${buildDir}/tmp/kotlin-classes/debug", excludes: ['**/R.class', '**/R$*.class', '**/*$ViewBinder*.*', @@ -35,7 +35,7 @@ task jacocoTestReport(type:JacocoReport, dependsOn: "testDebugUnitTest") { } additionalSourceDirs = files(coverageSourceDirs) sourceDirectories = files(coverageSourceDirs) - executionData = files("$buildDir/jacoco/testDebugUnitTest.exec") + executionData = files("${buildDir}/jacoco/testDebugUnitTest.exec") } tasks.withType(Test) { diff --git a/app/config/quality.gradle b/app/config/quality.gradle index 5292371..1ed7ba7 100644 --- a/app/config/quality.gradle +++ b/app/config/quality.gradle @@ -5,9 +5,9 @@ android { abortOnError false xmlReport true htmlReport true - lintConfig file("${project.rootDir}/app/config/lint/lint.xml") - htmlOutput file("$project.buildDir/reports/lint/lint-result.html") - xmlOutput file("$project.buildDir/reports/lint/lint-result.xml") + lintConfig file("${buildDir}/app/config/lint/lint.xml") + htmlOutput file("${buildDir}/reports/lint/lint-result.html") + xmlOutput file("${buildDir}/reports/lint/lint-result.xml") } } diff --git a/build.gradle b/build.gradle index 6fdeeb3..a4625e2 100644 --- a/build.gradle +++ b/build.gradle @@ -7,10 +7,13 @@ buildscript { repositories { google() mavenCentral() + maven { + url "https://plugins.gradle.org/m2/" + } } dependencies { classpath 'com.android.tools.build:gradle:8.3.0' - classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.7.1' + classpath 'gradle.plugin.org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.12.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "com.google.gms:google-services:4.4.1" classpath "com.google.firebase:firebase-appdistribution-gradle:4.2.0" @@ -26,7 +29,3 @@ allprojects { mavenCentral() } } - -task clean(type: Delete) { - delete rootProject.buildDir -} \ No newline at end of file