diff --git a/.github/workflows/cross-platform-tests.yml b/.github/workflows/cross-platform-tests.yml index b3bed7bc..a8c42104 100644 --- a/.github/workflows/cross-platform-tests.yml +++ b/.github/workflows/cross-platform-tests.yml @@ -56,9 +56,14 @@ jobs: # # Deliberately without -Dcountly.ui.pageLoadTests: that enables the one class showing a # transparent stage, which segfaults the JVM everywhere it has been tried. + # + # testUiWithLocalCore (see sdk-java-ui/build.gradle) runs the UI on this checkout's core. The + # release of a ui- tag still tests it against the released core it names. - name: Run the JavaFX UI tests if: always() shell: bash + env: + ORG_GRADLE_PROJECT_testUiWithLocalCore: 'true' run: | if [ "$RUNNER_OS" = "Linux" ]; then sudo apt-get update -qq && sudo apt-get install -y -qq xvfb diff --git a/sdk-java-ui/CHANGELOG.md b/sdk-java-ui/CHANGELOG.md index 26be802d..cdfbb57d 100644 --- a/sdk-java-ui/CHANGELOG.md +++ b/sdk-java-ui/CHANGELOG.md @@ -1,5 +1,6 @@ ## XX.XX.XX -* ! Minor breaking change ! `ly.count.sdk:java-ui` now has its own version numbers and is released only when it changes, so its version no longer follows the core SDK `ly.count.sdk:java`. It names the core version it needs, currently 26.8.0; if your project also declares `ly.count.sdk:java`, use that version or a newer one. +* ! Minor breaking change ! `ly.count.sdk:java-ui` now has its own version numbers and is released only when it changes, so its version no longer follows the core SDK `ly.count.sdk:java`. + It names the core version it needs, currently 26.8.0; if your project also declares `ly.count.sdk:java`, use that version or a newer one. ## 26.8.0 * First release, together with the Java SDK 26.8.0. See the Java SDK's [CHANGELOG](../CHANGELOG.md) for what it displays. diff --git a/sdk-java-ui/build.gradle b/sdk-java-ui/build.gradle index 613e3463..3a690707 100644 --- a/sdk-java-ui/build.gradle +++ b/sdk-java-ui/build.gradle @@ -71,6 +71,18 @@ dependencies { testImplementation 'org.mockito:mockito-core:4.11.0' } +// -PtestUiWithLocalCore=true builds and tests this module's source against the sdk-java project +// instead of the released core above. This module uses the core's internal classes, so a core +// change that breaks it fails CI before the core is released. It does not test the released +// java-ui jar on a newer core. +if (findProperty('testUiWithLocalCore') == 'true') { + configurations.configureEach { + resolutionStrategy.dependencySubstitution { + substitute module('ly.count.sdk:java') using project(':sdk-java') + } + } +} + // Coverage. Reports land in build/reports/jacoco/test/ (HTML to read, XML for tooling). // "./gradlew coverage" from the repo root runs this and prints a summary. apply plugin: 'jacoco'