From e39b2fbe9ff38258cee80ccf197481ab3f10c7bf Mon Sep 17 00:00:00 2001 From: Dimos Raptis <dimos.raptis@r3.com> Date: Mon, 7 Jan 2019 15:02:32 +0000 Subject: [PATCH] Exclude kotlin.jvm.internal from api scanning (#4478) --- .ci/check-api-changes.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.ci/check-api-changes.sh b/.ci/check-api-changes.sh index 2b01bfb74a..d79841d4e5 100755 --- a/.ci/check-api-changes.sh +++ b/.ci/check-api-changes.sh @@ -44,10 +44,12 @@ $newAbstracts EOF ` -#Get a list of any methods that expose classes in .internal. namespaces, and any classes which extend/implement -#an internal class +# Get a list of any methods that expose internal classes, which includes: +# - classes in .internal. namespaces (excluding the kotlin.jvm.internal namespace) +# - classes which extend/implement an internal class (see above) +# - classes in the net.corda.node. namespace #TODO: check that only classes in a whitelist are part of the API rather than look for specific invalid cases going forward -newInternalExposures=$(echo "$userDiffContents" | grep "^+" | grep "\.internal\." ) +newInternalExposures=$(echo "$userDiffContents" | grep "^+" | grep "(?<!kotlin\.jvm)\.internal\." ) newNodeExposures=$(echo "$userDiffContents" | grep "^+" | grep "net\.corda\.node\.") internalCount=`grep -v "^$" <<EOF | wc -l