You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by sm...@apache.org on 2020/05/04 22:12:30 UTC
[geode] 05/07: wip - major upgrade should allow breaking changes
This is an automated email from the ASF dual-hosted git repository.
smgoller pushed a commit to branch japicmp-gradle
in repository https://gitbox.apache.org/repos/asf/geode.git
commit 461256ed3e97bb81407dabe902a6cc15c89cb9db
Author: Robert Houghton <rh...@pivotal.io>
AuthorDate: Mon May 4 11:09:23 2020 -0700
wip - major upgrade should allow breaking changes
Signed-off-by: Sean Goller <sg...@pivotal.io>
---
geode-assembly/build.gradle | 24 +++++++++++-------------
1 file changed, 11 insertions(+), 13 deletions(-)
diff --git a/geode-assembly/build.gradle b/geode-assembly/build.gradle
index d85c51e..61e99cd 100755
--- a/geode-assembly/build.gradle
+++ b/geode-assembly/build.gradle
@@ -16,6 +16,7 @@
*/
import me.champeau.gradle.japicmp.JapicmpTask
+import me.champeau.gradle.japicmp.report.Severity
apply from: "${rootDir}/${scriptDir}/standard-subproject-configuration.gradle"
apply from: "${rootDir}/${scriptDir}/warnings.gradle"
@@ -731,14 +732,8 @@ import japicmp.model.JApiMethod
class AllowMajorBreakingChanges implements ViolationRule {
@Override
Violation maybeViolation(final JApiCompatibility member) {
- if (member instanceof JApiMethod) {
- if (!member.annotations.find { it.fullyQualifiedName == 'org.gradle.api.Incubating' }) {
- if (!member.jApiClass.annotations.find {
- it.fullyQualifiedName == 'org.gradle.api.Incubating'
- }) {
- Violation.error(member, "New method is not annotated with @Incubating")
- }
- }
+ if (!member.binaryCompatible()) {
+ Violation.notBinaryCompatible(member, Severity.warning)
}
}
}
@@ -768,13 +763,13 @@ tasks.register('japicmp', me.champeau.gradle.japicmp.JapicmpTask) {
onlyModified = true
accessModifier = "protected"
- def failBuild = true
+ def allowMajorBreaking = false
if (new DefaultArtifactVersion(version).majorVersion > new DefaultArtifactVersion(newest).majorVersion) {
logger.error("disable fail on binary breaking changes")
- failBuild = false
+ allowMajorBreaking = true
}
- failOnModification = failBuild
- failOnSourceIncompatibility = failBuild
+ failOnModification = allowMajorBreaking
+ failOnSourceIncompatibility = allowMajorBreaking
// onlyBinaryIncompatibleModified = true
// includeSynthetic = true
@@ -790,6 +785,9 @@ tasks.register('japicmp', me.champeau.gradle.japicmp.JapicmpTask) {
title = "Geode API Compatibility Report"
description = "Comparing current ${version} against downloaded v${newest}."
reportName = "rich-report-${reportFileName}.html"
- addDefaultRules = failBuild
+ if (allowMajorBreaking) {
+ addRule(AllowMajorBreakingChanges)
+// addDefaultRules = failBuild
+ }
}
}