fix(android) fix React-Native POM file when publishing

For some reason the packaging mode changed from AAR to POM after 0.68,
and dependencies are now marked optional, when they are not.

Fixes: https://github.com/jitsi/jitsi-meet/issues/13566
pull/13570/head
Saúl Ibarra Corretgé 2 years ago committed by Saúl Ibarra Corretgé
parent 18873a9659
commit d42cbbd9f8
  1. 12
      android/scripts/release-sdk.sh

@ -29,6 +29,10 @@ if [[ $MVN_HTTP == 1 ]]; then
# Push React Native
echo "Pushing React Native ${RN_VERSION} to the Maven repo"
pushd ${THIS_DIR}/../../node_modules/react-native/android/com/facebook/react/react-native/${RN_VERSION}
cat react-native-${RN_VERSION}.pom \
| sed "s#<packaging>pom</packaging>#<packaging>aar</packaging>#" \
| sed "/<optional>/d" \
> react-native-${RN_VERSION}-fixed.pom
mvn \
deploy:deploy-file \
-Durl=${MVN_REPO} \
@ -36,7 +40,7 @@ if [[ $MVN_HTTP == 1 ]]; then
-Dfile=react-native-${RN_VERSION}-release.aar \
-Dpackaging=aar \
-DgeneratePom=false \
-DpomFile=react-native-${RN_VERSION}.pom || true
-DpomFile=react-native-${RN_VERSION}-fixed.pom || true
popd
# Push JSC
echo "Pushing JSC ${JSC_VERSION} to the Maven repo"
@ -55,13 +59,17 @@ else
if [[ ! -d ${MVN_REPO}/com/facebook/react/react-native/${RN_VERSION} ]]; then
echo "Pushing React Native ${RN_VERSION} to the Maven repo"
pushd ${THIS_DIR}/../../node_modules/react-native/android/com/facebook/react/react-native/${RN_VERSION}
cat react-native-${RN_VERSION}.pom \
| sed "s#<packaging>pom</packaging>#<packaging>aar</packaging>#" \
| sed "/<optional>/d" \
> react-native-${RN_VERSION}-fixed.pom
mvn \
deploy:deploy-file \
-Durl=${MVN_REPO} \
-Dfile=react-native-${RN_VERSION}-release.aar \
-Dpackaging=aar \
-DgeneratePom=false \
-DpomFile=react-native-${RN_VERSION}.pom
-DpomFile=react-native-${RN_VERSION}-fixed.pom
popd
fi

Loading…
Cancel
Save