Skip to content

Commit

Permalink
fix: disable test fixtures publishing (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
monosoul authored Sep 6, 2022
1 parent a963e1e commit df5a410
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build-on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ jobs:
uses: gradle/gradle-build-action@v2
with:
arguments: check jacocoTestReport
- name: Test publishing
uses: gradle/gradle-build-action@v2
with:
arguments: publishToMavenLocal
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: always() # always run even if the previous step fails
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build-on-push-to-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ jobs:
uses: gradle/gradle-build-action@v2
with:
arguments: check jacocoTestReport
- name: Test publishing
uses: gradle/gradle-build-action@v2
with:
arguments: publishToMavenLocal
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: always() # always run even if the previous step fails
Expand Down
8 changes: 8 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ plugins {
`java-test-fixtures`
}

/**
* disable test fixtures publishing
* https://docs.gradle.org/current/userguide/java_testing.html#publishing_test_fixtures
*/
val javaComponent = components["java"] as AdhocComponentWithVariants
javaComponent.withVariantsFromConfiguration(configurations["testFixturesApiElements"]) { skip() }
javaComponent.withVariantsFromConfiguration(configurations["testFixturesRuntimeElements"]) { skip() }

repositories {
mavenCentral()
}
Expand Down

0 comments on commit df5a410

Please sign in to comment.