wttech/gradle-aem-single

Introduce Baseline Report for Validating Bundle Versions

toniedzwiedz opened this issue · 1 comments

The Maven Bundle Plugin automatically detects changes in public packages and checks if a version update is required.
Example:

[INFO] Baseline Report - Generated by Apache Felix Maven Bundle Plugin on 2018-08-17T12:30Z based on Bnd - see http://www.aqute.biz/Bnd/Bnd
[INFO] Comparing bundle org.apache.sling.dynamic-include version 3.2.0-SNAPSHOT to version 3.1.2
[INFO]
[INFO]   PACKAGE_NAME                                       DELTA      CUR_VER    BASE_VER   REC_VER    WARNINGS
[INFO] = ================================================== ========== ========== ========== ========== ==========
[INFO] * org.apache.sling.dynamicinclude                    major      4.0.0      4.1.0      5.0.0      Version increase required
[INFO]      > class org.apache.sling.dynamicinclude.Configuration
[INFO]          - method getExtension()
[INFO]              - return java.lang.String
[INFO]          - method hasExtension(org.apache.sling.api.SlingHttpServletRequest)
[INFO]              - return boolean
[INFO]          - method hasExtensionSet()
[INFO]              - return boolean
[INFO]      < class org.apache.sling.dynamicinclude.IncludeTagFilter
[INFO]          + method foo()
[INFO]              + return java.lang.String
[INFO]      + version 4.0.0
[INFO]      - version 4.1.0
[INFO] -----------------------------------------------------------------------------------------------------------
[INFO]   org.apache.sling.dynamicinclude.generator          unchanged  3.0.0      3.0.0      3.0.0      -
[INFO] -----------------------------------------------------------------------------------------------------------
[INFO]   org.apache.sling.dynamicinclude.generator.types    unchanged  3.0.0      3.0.0      3.0.0      -
[INFO] -----------------------------------------------------------------------------------------------------------
[INFO]   org.apache.sling.dynamicinclude.pathmatcher        unchanged  3.0.0      3.0.0      3.0.0      -
[INFO] -----------------------------------------------------------------------------------------------------------
[ERROR] org.apache.sling.dynamicinclude: Version increase required; detected 4.0.0, suggested 5.0.0
[INFO] Baseline analysis complete, 1 error(s), 0 warning(s)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 25.715 s
[INFO] Finished at: 2018-08-17T12:30:27+02:00
[INFO] Final Memory: 42M/377M
[INFO] ------------------------------------------------------------------------

Consider introducing this feature in the OOTB setup. Since this project is aimed at libraries and tools rather than projects, maintaining this kind of compatibility should be enabled by deafult.

probably it is possible even right now by just specyfing BND configuration by one of possible ways: https://github.com/Cognifide/gradle-aem-plugin/blob/master/src/main/kotlin/com/cognifide/gradle/aem/api/AemConfig.kt#L136-L158