Conversation
- settings.gradle: add com.enonic.xp.settings plugin 4.0.0-B1
- build.gradle: drop xp.base version pin, switch script-api/core-api to xplibs.api.* aliases
- gradle.properties: bump xpVersion 7.0.0 -> 8.0.0-B4
- Bump Gradle wrapper 8.1 -> 9.4.1
- Migrate tests from JUnit 4 to JUnit 5 (XP 8 ScriptTestSupport uses Jupiter)
- Add bodyStream: {} to test/example fixtures (XP 8 lib/xp/testing serializes ByteSource as {})
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #212 +/- ##
=========================================
Coverage 91.42% 91.42%
Complexity 156 156
=========================================
Files 9 9
Lines 513 513
Branches 58 58
=========================================
Hits 469 469
Misses 23 23
Partials 21 21 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrades the lib from XP 7 (
xpVersion=7.0.0) to XP 8 (xpVersion=8.0.0-B4) per thexp-app-upgraderskill workflow. Library, not an app — none of the descriptor steps (application.xml,site/, admin tools/widgets, etc.) apply here, so noxp8migratorrun was required.Build / dependency changes
settings.gradle: addedid 'com.enonic.xp.settings' version '4.0.0-B1'(latest published — 4.0.0-B4 is not on plugins.gradle.org yet, only A3 / B1)build.gradle:id 'com.enonic.xp.base'(settings plugin supplies it)compileOnly "com.enonic.xp:script-api:${xpVersion}"→compileOnly xplibs.api.scriptcompileOnly "com.enonic.xp:core-api:${xpVersion}"→compileOnly xplibs.api.corecom.enonic.xp:testing:${xpVersion}as a long-form coordinate (noxplibs.*alias for it)gradle.properties:xpVersion=7.0.0→xpVersion=8.0.0-B48.1→9.4.1(required by the new XP plugin family)Test migration
XP 8's
ScriptTestSupportuses JUnit 5 lifecycle annotations (@BeforeEach/@AfterEach), so the JUnit 4 test suite needed migrating:junit:junit:4.13.2→org.junit.jupiter:junit-jupiter:5.11.4+junit-jupiter-engine+junit-platform-launcher(latter required by Gradle 9)test { useJUnitPlatform() }@org.junit.Test|Before|After|Ignore|Ruleandorg.junit.Assert.*with theirorg.junit.jupiter.apiequivalents@Test(timeout = 20000)→@Test+@Timeout(20)@Rule TemporaryFolder→@TempDir Path(usingtempFolder.resolve(name).toFile()instead oftempFolder.newFile(name))assertTrue/False(message, condition)→assertTrue/False(condition, message)(JUnit 5 message-arg position swap)Test fixture update
XP 8's
/lib/xp/testing.jsassertJsonEqualsrunsJSON.stringifywith areplaceJavareviver that convertscom.google.common.io.ByteSourceto{}(instead of dropping it as in XP 7). SinceResponseMapperwritesgen.value("bodyStream", bodySource), the response now stringifies with a"bodyStream": {}field. Added that field to every expected JSON inrequest-test.js,secure-request-test.js, and the shippedlib/examples/http-client/request.jsdoc example. No Java/runtime behavior change.Not performed
🤖 Generated with Claude Code