Check usage of `import org.matrix.android.sdk.internal` app side

This commit is contained in:
Benoit Marty 2022-04-11 11:54:16 +02:00 committed by Benoit Marty
parent c9bbf6c53a
commit f4fba2dd2d
2 changed files with 31 additions and 0 deletions

View File

@ -84,6 +84,18 @@ ${searchForbiddenStringsScript} ./tools/check/forbidden_strings_in_code_sdk.txt
resultForbiddenStringInCodeSdk=$? resultForbiddenStringInCodeSdk=$?
echo
echo "Search for forbidden patterns specific for App code..."
${searchForbiddenStringsScript} ./tools/check/forbidden_strings_in_code_app.txt \
./vector/src/main/java \
./vector/src/debug/java \
./vector/src/release/java \
./vector/src/fdroid/java \
./vector/src/gplay/java
resultForbiddenStringInCodeApp=$?
echo echo
echo "Search for forbidden patterns in resources..." echo "Search for forbidden patterns in resources..."
@ -167,6 +179,7 @@ echo
if [[ ${resultNbOfDrawable} -eq 0 ]] \ if [[ ${resultNbOfDrawable} -eq 0 ]] \
&& [[ ${resultForbiddenStringInCode} -eq 0 ]] \ && [[ ${resultForbiddenStringInCode} -eq 0 ]] \
&& [[ ${resultForbiddenStringInCodeSdk} -eq 0 ]] \ && [[ ${resultForbiddenStringInCodeSdk} -eq 0 ]] \
&& [[ ${resultForbiddenStringInCodeApp} -eq 0 ]] \
&& [[ ${resultForbiddenStringInResource} -eq 0 ]] \ && [[ ${resultForbiddenStringInResource} -eq 0 ]] \
&& [[ ${resultForbiddenStringInLayout} -eq 0 ]] \ && [[ ${resultForbiddenStringInLayout} -eq 0 ]] \
&& [[ ${resultLongFiles} -eq 0 ]] \ && [[ ${resultLongFiles} -eq 0 ]] \

View File

@ -0,0 +1,18 @@
#
# Copyright 2022 New Vector Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
### You should not use code from internal SDK package. Either move them to the API package, or add a proper API to access this code, and add internal keyword SDK side.
import org.matrix.android.sdk.internal