diff --git a/.github/workflows/build-workflow.yml b/.github/workflows/build-workflow.yml index ce27b42e..bcc135d4 100644 --- a/.github/workflows/build-workflow.yml +++ b/.github/workflows/build-workflow.yml @@ -27,7 +27,7 @@ jobs: - name: Run Formula Android Instrumentation Tests run: ./gradlew :formula-android-tests:testRelease - name: Run Formula Lint Tests - run: ./gradlew :formula-lint:test + run: ./gradlew :formula-lint:build - name: Generate Jacoco Report run: ./gradlew jacocoTestReportMerged - name: Save Jacoco Report diff --git a/build.gradle.kts b/build.gradle.kts index 77398c20..b1213783 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -115,4 +115,16 @@ tasks.register("install") { dependsOn(publishTasks) } +// We disable jacoco report when running buildTask +val isBuild = gradle.startParameter.taskNames.any { it.contains("build") } +if (isBuild) { + subprojects { + plugins.withType(JacocoPlugin::class) { + tasks.withType() { + enabled = false + } + } + } +} + apply(from = "gradle/merge-reports.gradle") diff --git a/formula-android/build.gradle.kts b/formula-android/build.gradle.kts index f93d228e..fd43786d 100644 --- a/formula-android/build.gradle.kts +++ b/formula-android/build.gradle.kts @@ -1,3 +1,7 @@ +import com.android.build.gradle.internal.coverage.JacocoReportTask +import com.android.build.gradle.internal.lint.AndroidLintAnalysisTask +import com.android.build.gradle.internal.lint.LintModelWriterTask + plugins { id("com.android.library") id("kotlin-android") @@ -28,8 +32,6 @@ task("javadoc") { source(android.sourceSets["main"].java.getSourceFiles()) classpath = project.files( android.bootClasspath.joinToString(separator = File.pathSeparator), - configurations.api, - configurations.implementation ) } diff --git a/formula-lint/build.gradle.kts b/formula-lint/build.gradle.kts index 14622a42..3ce39833 100644 --- a/formula-lint/build.gradle.kts +++ b/formula-lint/build.gradle.kts @@ -22,12 +22,3 @@ dependencies { testImplementation(libs.lint.tests) testImplementation(libs.junit) } - -// Need to register direct task dependencies since jacocoTestReport is -// accessing the files produced by those lint tasks -plugins.withId("jacoco") { - tasks.named("jacocoTestReport") { - dependsOn(tasks.withType()) - dependsOn(tasks.withType()) - } -} diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 73ea4971..72ec223e 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] android-gradle = "8.2.0" -dokka-gradle = "1.4.32" +dokka-gradle = "1.9.10" kotlin = "1.9.10" coroutines = "1.5.2"