Skip to content

Commit

Permalink
Fix issues with artifact publishing.
Browse files Browse the repository at this point in the history
  • Loading branch information
Laimiux committed Jan 4, 2024
1 parent 96e1fd5 commit 07e78aa
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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<JacocoReport>() {
enabled = false
}
}
}
}

apply(from = "gradle/merge-reports.gradle")
6 changes: 4 additions & 2 deletions formula-android/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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")
Expand Down Expand Up @@ -28,8 +32,6 @@ task<Javadoc>("javadoc") {
source(android.sourceSets["main"].java.getSourceFiles())
classpath = project.files(
android.bootClasspath.joinToString(separator = File.pathSeparator),
configurations.api,
configurations.implementation
)
}

Expand Down
9 changes: 0 additions & 9 deletions formula-lint/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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<AndroidLintAnalysisTask>())
dependsOn(tasks.withType<LintModelWriterTask>())
}
}
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit 07e78aa

Please sign in to comment.